home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1993-08-24 | 42.9 KB | [TEXT/MPS ] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Tue Aug 24 15:23:54 1993, modified Tue Aug 24 15:23:54 1993, creator 'MPS ', type ASCII, 43113 bytes "draw.window.c" , at 0xa8e9 608 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MPS ] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 64 72 61 77 2e 77 | 69 6e 64 6f 77 2e 63 00 |..draw.w|indow.c.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 a8 69 00 | 00 02 60 a8 a0 1b 4a a8 |......i.|..`...J.|
|00000060| a0 1b 4a 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..J.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 79 bd 00 00 |........|....y...|
|00000080| 2f 2a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/*------|--------|
|00000090| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000d0| 2d 2d 2d 2d 2d 2d 2d 0d | 20 2a 0d 20 2a 20 53 69 |-------.| *. * Si|
|000000e0| 6d 70 6c 65 20 53 61 6d | 70 6c 65 20 50 6f 77 65 |mple Sam|ple Powe|
|000000f0| 72 54 61 6c 6b 20 41 70 | 70 6c 69 63 61 74 69 6f |rTalk Ap|plicatio|
|00000100| 6e 20 46 72 61 6d 65 77 | 6f 72 6b 0d 20 2a 0d 20 |n Framew|ork. *. |
|00000110| 2a 20 a9 31 39 39 31 2d | 31 39 39 33 20 41 70 70 |* .1991-|1993 App|
|00000120| 6c 65 20 43 6f 6d 70 75 | 74 65 72 0d 20 2a 0d 20 |le Compu|ter. *. |
|00000130| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000140| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000150| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000160| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000170| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000180| 2d 2d 2d 2d 2d 2a 2f 0d | 2f 2a 0d 20 2a 20 64 72 |-----*/.|/*. * dr|
|00000190| 61 77 2e 77 69 6e 64 6f | 77 2e 63 20 2d 2d 20 77 |aw.windo|w.c -- w|
|000001a0| 69 6e 64 6f 77 20 63 6c | 61 73 73 20 69 6e 73 74 |indow cl|ass inst|
|000001b0| 61 6e 74 69 61 74 69 6f | 6e 2f 64 69 73 70 61 74 |antiatio|n/dispat|
|000001c0| 63 68 69 6e 67 0d 20 2a | 0d 20 2a 20 63 68 61 6e |ching. *|. * chan|
|000001d0| 67 65 20 68 69 73 74 6f | 72 79 3a 0d 20 2a 0d 20 |ge histo|ry:. *. |
|000001e0| 2a 20 53 4a 46 09 09 30 | 38 2f 32 33 2f 39 33 09 |* SJF..0|8/23/93.|
|000001f0| 09 31 2e 30 66 31 09 09 | 75 70 64 61 74 65 20 74 |.1.0f1..|update t|
|00000200| 6f 20 66 69 6e 61 6c 20 | 68 65 61 64 65 72 73 2c |o final |headers,|
|00000210| 20 66 69 78 20 63 6f 6d | 6d 65 6e 74 73 0d 20 2a | fix com|ments. *|
|00000220| 20 53 4a 46 09 09 30 34 | 2f 32 31 2f 39 33 09 09 | SJF..04|/21/93..|
|00000230| 31 2e 30 62 32 09 09 75 | 70 64 61 74 65 20 74 6f |1.0b2..u|pdate to|
|00000240| 20 62 32 0d 20 2a 20 53 | 4a 46 09 09 30 33 2f 30 | b2. * S|JF..03/0|
|00000250| 31 2f 39 33 09 09 31 2e | 30 62 31 09 09 61 64 64 |1/93..1.|0b1..add|
|00000260| 65 64 20 64 69 67 69 74 | 61 6c 20 73 69 67 6e 61 |ed digit|al signa|
|00000270| 74 75 72 65 73 0d 20 2a | 20 53 4a 46 09 09 30 32 |tures. *| SJF..02|
|00000280| 2f 30 39 2f 39 33 09 09 | 31 2e 30 62 31 09 09 75 |/09/93..|1.0b1..u|
|00000290| 70 64 61 74 65 20 74 6f | 20 62 31 0d 20 2a 20 53 |pdate to| b1. * S|
|000002a0| 4a 46 09 09 31 30 2f 31 | 33 2f 39 32 09 09 31 2e |JF..10/1|3/92..1.|
|000002b0| 30 64 34 09 09 75 70 64 | 61 74 65 20 74 6f 20 61 |0d4..upd|ate to a|
|000002c0| 31 31 0d 20 2a 20 53 4a | 46 09 09 30 39 2f 30 39 |11. * SJ|F..09/09|
|000002d0| 2f 39 32 09 09 31 2e 30 | 64 33 09 09 75 70 64 61 |/92..1.0|d3..upda|
|000002e0| 74 65 20 74 6f 20 61 39 | 0d 20 2a 20 53 4a 46 09 |te to a9|. * SJF.|
|000002f0| 09 30 35 2f 30 37 2f 39 | 32 09 09 31 2e 30 64 32 |.05/07/9|2..1.0d2|
|00000300| 09 09 75 70 64 61 74 65 | 20 74 6f 20 61 36 0d 20 |..update| to a6. |
|00000310| 2a 20 53 4a 46 09 09 31 | 31 2f 30 36 2f 39 31 09 |* SJF..1|1/06/91.|
|00000320| 09 31 2e 30 64 31 09 09 | 69 6e 69 74 69 61 6c 20 |.1.0d1..|initial |
|00000330| 63 6f 64 69 6e 67 0d 20 | 2a 0d 20 2a 2f 0d 0d 23 |coding. |*. */..#|
|00000340| 69 66 6e 64 65 66 20 5f | 5f 54 59 50 45 53 5f 5f |ifndef _|_TYPES__|
|00000350| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 54 79 70 65 73 |.#includ|e <Types|
|00000360| 2e 68 3e 0d 23 65 6e 64 | 69 66 0d 0d 23 69 66 6e |.h>.#end|if..#ifn|
|00000370| 64 65 66 20 5f 5f 51 55 | 49 43 4b 44 52 41 57 5f |def __QU|ICKDRAW_|
|00000380| 5f 0d 23 69 6e 63 6c 75 | 64 65 20 3c 51 75 69 63 |_.#inclu|de <Quic|
|00000390| 6b 44 72 61 77 2e 68 3e | 0d 23 65 6e 64 69 66 0d |kDraw.h>|.#endif.|
|000003a0| 0d 23 69 66 6e 64 65 66 | 20 5f 5f 57 49 4e 44 4f |.#ifndef| __WINDO|
|000003b0| 57 53 5f 5f 0d 23 69 6e | 63 6c 75 64 65 20 3c 57 |WS__.#in|clude <W|
|000003c0| 69 6e 64 6f 77 73 2e 68 | 3e 0d 23 65 6e 64 69 66 |indows.h|>.#endif|
|000003d0| 0d 0d 23 69 66 6e 64 65 | 66 20 5f 5f 4d 45 4e 55 |..#ifnde|f __MENU|
|000003e0| 53 5f 5f 0d 23 69 6e 63 | 6c 75 64 65 20 3c 4d 65 |S__.#inc|lude <Me|
|000003f0| 6e 75 73 2e 68 3e 0d 23 | 65 6e 64 69 66 0d 0d 23 |nus.h>.#|endif..#|
|00000400| 69 66 6e 64 65 66 20 5f | 5f 46 49 4c 45 53 5f 5f |ifndef _|_FILES__|
|00000410| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 46 69 6c 65 73 |.#includ|e <Files|
|00000420| 2e 68 3e 0d 23 65 6e 64 | 69 66 0d 0d 23 69 66 6e |.h>.#end|if..#ifn|
|00000430| 64 65 66 20 5f 5f 53 43 | 52 49 50 54 5f 5f 0d 23 |def __SC|RIPT__.#|
|00000440| 69 6e 63 6c 75 64 65 20 | 3c 53 63 72 69 70 74 2e |include |<Script.|
|00000450| 68 3e 0d 23 65 6e 64 69 | 66 0d 0d 23 69 66 6e 64 |h>.#endi|f..#ifnd|
|00000460| 65 66 20 5f 5f 45 52 52 | 4f 52 53 5f 5f 0d 23 69 |ef __ERR|ORS__.#i|
|00000470| 6e 63 6c 75 64 65 20 3c | 45 72 72 6f 72 73 2e 68 |nclude <|Errors.h|
|00000480| 3e 0d 23 65 6e 64 69 66 | 0d 0d 23 69 66 6e 64 65 |>.#endif|..#ifnde|
|00000490| 66 20 5f 5f 46 4f 4c 44 | 45 52 53 5f 5f 0d 23 69 |f __FOLD|ERS__.#i|
|000004a0| 6e 63 6c 75 64 65 20 3c | 46 6f 6c 64 65 72 73 2e |nclude <|Folders.|
|000004b0| 68 3e 0d 23 65 6e 64 69 | 66 0d 0d 23 69 66 64 65 |h>.#endi|f..#ifde|
|000004c0| 66 20 54 48 49 4e 4b 5f | 43 0d 23 69 6e 63 6c 75 |f THINK_|C.#inclu|
|000004d0| 64 65 20 3c 42 44 43 2e | 68 3e 09 2f 2f 77 6f 72 |de <BDC.|h>.//wor|
|000004e0| 6b 61 72 6f 75 6e 64 20 | 66 6f 72 20 70 72 6f 62 |karound |for prob|
|000004f0| 6c 65 6d 20 77 69 74 68 | 20 54 68 69 6e 6b 27 73 |lem with| Think's|
|00000500| 20 70 61 63 6b 61 67 65 | 73 2e 68 0d 23 65 6e 64 | package|s.h.#end|
|00000510| 69 66 0d 0d 23 69 66 6e | 64 65 66 20 5f 5f 50 41 |if..#ifn|def __PA|
|00000520| 43 4b 41 47 45 53 5f 5f | 0d 23 69 6e 63 6c 75 64 |CKAGES__|.#includ|
|00000530| 65 20 3c 50 61 63 6b 61 | 67 65 73 2e 68 3e 0d 23 |e <Packa|ges.h>.#|
|00000540| 65 6e 64 69 66 0d 0d 23 | 69 66 6e 64 65 66 20 5f |endif..#|ifndef _|
|00000550| 5f 4f 43 45 53 54 41 4e | 44 41 52 44 4d 41 49 4c |_OCESTAN|DARDMAIL|
|00000560| 5f 5f 0d 23 69 6e 63 6c | 75 64 65 20 3c 4f 43 45 |__.#incl|ude <OCE|
|00000570| 53 74 61 6e 64 61 72 64 | 4d 61 69 6c 2e 68 3e 0d |Standard|Mail.h>.|
|00000580| 23 65 6e 64 69 66 0d 0d | 23 69 66 6e 64 65 66 20 |#endif..|#ifndef |
|00000590| 5f 5f 52 45 53 4f 55 52 | 43 45 53 5f 5f 0d 23 69 |__RESOUR|CES__.#i|
|000005a0| 6e 63 6c 75 64 65 20 3c | 52 65 73 6f 75 72 63 65 |nclude <|Resource|
|000005b0| 73 2e 68 3e 0d 23 65 6e | 64 69 66 0d 0d 23 69 6e |s.h>.#en|dif..#in|
|000005c0| 63 6c 75 64 65 20 22 63 | 6f 6e 73 74 2e 68 22 0d |clude "c|onst.h".|
|000005d0| 23 69 6e 63 6c 75 64 65 | 20 22 73 74 72 63 6f 6e |#include| "strcon|
|000005e0| 73 74 2e 68 22 0d 23 69 | 6e 63 6c 75 64 65 20 22 |st.h".#i|nclude "|
|000005f0| 6d 79 74 79 70 65 73 2e | 68 22 0d 23 69 6e 63 6c |mytypes.|h".#incl|
|00000600| 75 64 65 20 22 67 6c 6f | 62 61 6c 73 2e 68 22 0d |ude "glo|bals.h".|
|00000610| 23 69 6e 63 6c 75 64 65 | 20 22 75 74 69 6c 73 2e |#include| "utils.|
|00000620| 68 22 0d 23 69 6e 63 6c | 75 64 65 20 22 77 69 6e |h".#incl|ude "win|
|00000630| 64 6f 77 73 74 75 66 66 | 2e 68 22 0d 23 69 6e 63 |dowstuff|.h".#inc|
|00000640| 6c 75 64 65 20 22 6d 79 | 6d 65 6e 75 73 2e 68 22 |lude "my|menus.h"|
|00000650| 0d 23 69 6e 63 6c 75 64 | 65 20 22 64 69 67 69 73 |.#includ|e "digis|
|00000660| 69 67 2e 68 22 0d 23 69 | 6e 63 6c 75 64 65 20 22 |ig.h".#i|nclude "|
|00000670| 62 61 73 65 2e 77 69 6e | 64 6f 77 2e 68 22 0d 23 |base.win|dow.h".#|
|00000680| 69 6e 63 6c 75 64 65 20 | 22 77 69 6e 64 75 74 69 |include |"winduti|
|00000690| 6c 73 2e 68 22 0d 0d 23 | 69 6e 63 6c 75 64 65 20 |ls.h"..#|include |
|000006a0| 22 64 72 61 77 2e 77 69 | 6e 64 6f 77 2e 68 22 0d |"draw.wi|ndow.h".|
|000006b0| 0d 23 64 65 66 69 6e 65 | 20 6b 4c 69 6e 65 53 6c |.#define| kLineSl|
|000006c0| 6f 70 09 09 35 0d 23 64 | 65 66 69 6e 65 09 6b 53 |op..5.#d|efine.kS|
|000006d0| 6c 6f 70 09 09 09 32 0d | 23 64 65 66 69 6e 65 09 |lop...2.|#define.|
|000006e0| 6b 41 6e 63 68 6f 72 57 | 69 64 74 68 09 32 0d 0d |kAnchorW|idth.2..|
|000006f0| 2f 2a 20 69 6e 73 74 61 | 6e 74 69 61 74 65 20 61 |/* insta|ntiate a|
|00000700| 20 6e 65 77 20 64 72 61 | 77 20 77 69 6e 64 6f 77 | new dra|w window|
|00000710| 20 2a 2f 0d 0d 57 69 6e | 64 6f 77 50 74 72 20 44 | */..Win|dowPtr D|
|00000720| 72 61 77 4d 61 6b 65 57 | 69 6e 64 6f 77 28 52 65 |rawMakeW|indow(Re|
|00000730| 63 74 20 2a 77 52 65 63 | 74 2c 53 74 72 69 6e 67 |ct *wRec|t,String|
|00000740| 50 74 72 20 74 69 74 6c | 65 2c 42 6f 6f 6c 65 61 |Ptr titl|e,Boolea|
|00000750| 6e 20 76 69 73 69 62 6c | 65 2c 73 68 6f 72 74 20 |n visibl|e,short |
|00000760| 77 64 65 66 50 72 6f 63 | 2c 0d 09 09 09 09 09 09 |wdefProc|,.......|
|00000770| 09 42 6f 6f 6c 65 61 6e | 20 67 6f 41 77 61 79 46 |.Boolean| goAwayF|
|00000780| 6c 61 67 29 0d 7b 0d 09 | 57 49 6e 66 6f 50 74 72 |lag).{..|WInfoPtr|
|00000790| 20 69 6e 66 6f 50 74 72 | 3b 0d 09 57 69 6e 64 6f | infoPtr|;..Windo|
|000007a0| 77 50 74 72 20 74 68 65 | 57 69 6e 64 6f 77 3b 0d |wPtr the|Window;.|
|000007b0| 09 63 68 61 72 20 68 53 | 74 61 74 65 3b 0d 09 0d |.char hS|tate;...|
|000007c0| 09 74 68 65 57 69 6e 64 | 6f 77 20 3d 20 42 61 73 |.theWind|ow = Bas|
|000007d0| 65 4d 61 6b 65 57 69 6e | 64 6f 77 28 77 52 65 63 |eMakeWin|dow(wRec|
|000007e0| 74 2c 74 69 74 6c 65 2c | 76 69 73 69 62 6c 65 2c |t,title,|visible,|
|000007f0| 77 64 65 66 50 72 6f 63 | 2c 67 6f 41 77 61 79 46 |wdefProc|,goAwayF|
|00000800| 6c 61 67 29 3b 0d 09 53 | 65 74 57 69 6e 64 6f 77 |lag);..S|etWindow|
|00000810| 4b 69 6e 64 28 74 68 65 | 57 69 6e 64 6f 77 2c 6b |Kind(the|Window,k|
|00000820| 44 72 61 77 57 69 6e 64 | 6f 77 29 3b 0d 0d 09 69 |DrawWind|ow);...i|
|00000830| 6e 66 6f 50 74 72 20 3d | 20 42 65 67 69 6e 57 69 |nfoPtr =| BeginWi|
|00000840| 6e 64 6f 77 41 63 63 65 | 73 73 28 74 68 65 57 69 |ndowAcce|ss(theWi|
|00000850| 6e 64 6f 77 2c 26 68 53 | 74 61 74 65 29 3b 0d 09 |ndow,&hS|tate);..|
|00000860| 0d 09 53 65 74 44 72 61 | 77 4d 65 74 68 6f 64 73 |..SetDra|wMethods|
|00000870| 28 69 6e 66 6f 50 74 72 | 29 3b 0d 09 0d 09 2f 2f |(infoPtr|);....//|
|00000880| 20 73 65 74 20 6f 74 68 | 65 72 20 77 69 6e 64 6f | set oth|er windo|
|00000890| 77 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 0d 09 69 |w inform|ation..i|
|000008a0| 6e 66 6f 50 74 72 2d 3e | 64 61 74 61 20 3d 20 6e |nfoPtr->|data = n|
|000008b0| 69 6c 3b 0d 09 69 6e 66 | 6f 50 74 72 2d 3e 6f 74 |il;..inf|oPtr->ot|
|000008c0| 68 65 72 44 61 74 61 5b | 6b 44 53 49 47 44 61 74 |herData[|kDSIGDat|
|000008d0| 61 5d 20 3d 20 6e 69 6c | 3b 0d 09 0d 09 2f 2f 20 |a] = nil|;....// |
|000008e0| 6d 61 6b 65 20 73 63 72 | 6f 6c 6c 20 62 61 72 73 |make scr|oll bars|
|000008f0| 0d 09 4d 61 6b 65 53 63 | 72 6f 6c 6c 42 61 72 73 |..MakeSc|rollBars|
|00000900| 28 74 68 65 57 69 6e 64 | 6f 77 2c 69 6e 66 6f 50 |(theWind|ow,infoP|
|00000910| 74 72 29 3b 0d 09 0d 09 | 45 6e 64 57 69 6e 64 6f |tr);....|EndWindo|
|00000920| 77 41 63 63 65 73 73 28 | 74 68 65 57 69 6e 64 6f |wAccess(|theWindo|
|00000930| 77 2c 68 53 74 61 74 65 | 29 3b 0d 09 0d 09 72 65 |w,hState|);....re|
|00000940| 74 75 72 6e 20 74 68 65 | 57 69 6e 64 6f 77 3b 0d |turn the|Window;.|
|00000950| 7d 0d 0d 0d 2f 2a 20 73 | 65 74 20 75 70 20 74 68 |}.../* s|et up th|
|00000960| 65 20 6d 65 74 68 6f 64 | 20 70 6f 69 6e 74 65 72 |e method| pointer|
|00000970| 73 20 66 6f 72 20 74 68 | 65 20 64 72 61 77 69 6e |s for th|e drawin|
|00000980| 67 20 77 69 6e 64 6f 77 | 20 63 6c 61 73 73 20 28 |g window| class (|
|00000990| 6d 61 79 20 62 65 20 63 | 61 6c 6c 65 64 20 77 68 |may be c|alled wh|
|000009a0| 65 6e 20 61 20 6d 61 69 | 6c 65 72 0d 20 20 20 67 |en a mai|ler. g|
|000009b0| 65 74 73 20 61 64 64 65 | 64 2f 72 65 6d 6f 76 65 |ets adde|d/remove|
|000009c0| 64 0d 2a 2f 0d 76 6f 69 | 64 20 53 65 74 44 72 61 |d.*/.voi|d SetDra|
|000009d0| 77 4d 65 74 68 6f 64 73 | 28 57 49 6e 66 6f 50 74 |wMethods|(WInfoPt|
|000009e0| 72 20 69 6e 66 6f 50 74 | 72 29 0d 7b 0d 09 69 6e |r infoPt|r).{..in|
|000009f0| 66 6f 50 74 72 2d 3e 6d | 5f 69 64 6c 65 20 3d 20 |foPtr->m|_idle = |
|00000a00| 42 61 73 65 49 64 6c 65 | 57 69 6e 64 6f 77 3b 0d |BaseIdle|Window;.|
|00000a10| 09 69 6e 66 6f 50 74 72 | 2d 3e 6d 5f 66 69 78 43 |.infoPtr|->m_fixC|
|00000a20| 75 72 73 6f 72 20 3d 20 | 44 72 61 77 46 69 78 43 |ursor = |DrawFixC|
|00000a30| 75 72 73 6f 72 57 69 6e | 64 6f 77 3b 0d 09 69 6e |ursorWin|dow;..in|
|00000a40| 66 6f 50 74 72 2d 3e 6d | 5f 61 63 74 69 76 61 74 |foPtr->m|_activat|
|00000a50| 65 20 3d 20 44 72 61 77 | 41 63 74 69 76 61 74 65 |e = Draw|Activate|
|00000a60| 57 69 6e 64 6f 77 3b 0d | 09 69 6e 66 6f 50 74 72 |Window;.|.infoPtr|
|00000a70| 2d 3e 6d 5f 64 65 61 63 | 74 69 76 61 74 65 20 3d |->m_deac|tivate =|
|00000a80| 20 44 72 61 77 44 65 61 | 63 74 69 76 61 74 65 57 | DrawDea|ctivateW|
|00000a90| 69 6e 64 6f 77 3b 0d 09 | 69 6e 66 6f 50 74 72 2d |indow;..|infoPtr-|
|00000aa0| 3e 6d 5f 75 70 64 61 74 | 65 20 3d 20 44 72 61 77 |>m_updat|e = Draw|
|00000ab0| 55 70 64 61 74 65 57 69 | 6e 64 6f 77 3b 0d 09 69 |UpdateWi|ndow;..i|
|00000ac0| 6e 66 6f 50 74 72 2d 3e | 6d 5f 6b 65 79 20 3d 20 |nfoPtr->|m_key = |
|00000ad0| 42 61 73 65 4b 65 79 57 | 69 6e 64 6f 77 3b 0d 09 |BaseKeyW|indow;..|
|00000ae0| 69 6e 66 6f 50 74 72 2d | 3e 6d 5f 72 65 73 69 7a |infoPtr-|>m_resiz|
|00000af0| 65 20 3d 20 44 72 61 77 | 52 65 73 69 7a 65 57 69 |e = Draw|ResizeWi|
|00000b00| 6e 64 6f 77 3b 0d 09 69 | 6e 66 6f 50 74 72 2d 3e |ndow;..i|nfoPtr->|
|00000b10| 6d 5f 63 6c 69 63 6b 20 | 3d 20 44 72 61 77 43 6c |m_click |= DrawCl|
|00000b20| 69 63 6b 57 69 6e 64 6f | 77 3b 0d 09 69 6e 66 6f |ickWindo|w;..info|
|00000b30| 50 74 72 2d 3e 6d 5f 64 | 65 73 74 72 6f 79 20 3d |Ptr->m_d|estroy =|
|00000b40| 20 44 72 61 77 44 65 73 | 74 72 6f 79 57 69 6e 64 | DrawDes|troyWind|
|00000b50| 6f 77 3b 0d 09 69 6e 66 | 6f 50 74 72 2d 3e 6d 5f |ow;..inf|oPtr->m_|
|00000b60| 75 6e 64 6f 20 3d 20 44 | 72 61 77 55 6e 64 6f 57 |undo = D|rawUndoW|
|00000b70| 69 6e 64 6f 77 3b 0d 09 | 69 6e 66 6f 50 74 72 2d |indow;..|infoPtr-|
|00000b80| 3e 6d 5f 63 75 74 20 3d | 20 42 61 73 65 43 75 74 |>m_cut =| BaseCut|
|00000b90| 57 69 6e 64 6f 77 3b 0d | 09 69 6e 66 6f 50 74 72 |Window;.|.infoPtr|
|00000ba0| 2d 3e 6d 5f 63 6f 70 79 | 20 3d 20 42 61 73 65 43 |->m_copy| = BaseC|
|00000bb0| 6f 70 79 57 69 6e 64 6f | 77 3b 0d 09 69 6e 66 6f |opyWindo|w;..info|
|00000bc0| 50 74 72 2d 3e 6d 5f 70 | 61 73 74 65 20 3d 20 42 |Ptr->m_p|aste = B|
|00000bd0| 61 73 65 50 61 73 74 65 | 57 69 6e 64 6f 77 3b 0d |asePaste|Window;.|
|00000be0| 09 69 6e 66 6f 50 74 72 | 2d 3e 6d 5f 63 6c 65 61 |.infoPtr|->m_clea|
|00000bf0| 72 20 3d 20 42 61 73 65 | 43 6c 65 61 72 57 69 6e |r = Base|ClearWin|
|00000c00| 64 6f 77 3b 0d 09 69 6e | 66 6f 50 74 72 2d 3e 6d |dow;..in|foPtr->m|
|00000c10| 5f 70 72 69 6e 74 20 3d | 20 44 72 61 77 50 72 69 |_print =| DrawPri|
|00000c20| 6e 74 57 69 6e 64 6f 77 | 3b 0d 09 69 6e 66 6f 50 |ntWindow|;..infoP|
|00000c30| 74 72 2d 3e 6d 5f 70 61 | 67 65 53 65 74 75 70 20 |tr->m_pa|geSetup |
|00000c40| 3d 20 44 72 61 77 50 61 | 67 65 53 65 74 75 70 57 |= DrawPa|geSetupW|
|00000c50| 69 6e 64 6f 77 3b 0d 09 | 69 6e 66 6f 50 74 72 2d |indow;..|infoPtr-|
|00000c60| 3e 6d 5f 73 61 76 65 20 | 3d 20 44 72 61 77 53 61 |>m_save |= DrawSa|
|00000c70| 76 65 57 69 6e 64 6f 77 | 3b 0d 09 69 6e 66 6f 50 |veWindow|;..infoP|
|00000c80| 74 72 2d 3e 6d 5f 6c 6f | 61 64 20 3d 20 44 72 61 |tr->m_lo|ad = Dra|
|00000c90| 77 4c 6f 61 64 57 69 6e | 64 6f 77 3b 0d 09 69 6e |wLoadWin|dow;..in|
|00000ca0| 66 6f 50 74 72 2d 3e 6d | 5f 65 76 65 6e 74 20 3d |foPtr->m|_event =|
|00000cb0| 20 42 61 73 65 45 76 65 | 6e 74 57 69 6e 64 6f 77 | BaseEve|ntWindow|
|00000cc0| 3b 0d 09 69 6e 66 6f 50 | 74 72 2d 3e 6d 5f 63 74 |;..infoP|tr->m_ct|
|00000cd0| 72 6c 48 69 74 20 3d 20 | 44 72 61 77 48 69 74 43 |rlHit = |DrawHitC|
|00000ce0| 6f 6e 74 72 6f 6c 57 69 | 6e 64 6f 77 3b 0d 09 69 |ontrolWi|ndow;..i|
|00000cf0| 6e 66 6f 50 74 72 2d 3e | 6d 5f 73 65 6c 65 63 74 |nfoPtr->|m_select|
|00000d00| 41 6c 6c 20 3d 20 44 72 | 61 77 53 65 6c 65 63 74 |All = Dr|awSelect|
|00000d10| 41 6c 6c 57 69 6e 64 6f | 77 3b 0d 09 69 6e 66 6f |AllWindo|w;..info|
|00000d20| 50 74 72 2d 3e 6d 5f 67 | 72 6f 75 70 20 3d 20 44 |Ptr->m_g|roup = D|
|00000d30| 72 61 77 47 72 6f 75 70 | 57 69 6e 64 6f 77 3b 0d |rawGroup|Window;.|
|00000d40| 09 69 6e 66 6f 50 74 72 | 2d 3e 6d 5f 75 6e 47 72 |.infoPtr|->m_unGr|
|00000d50| 6f 75 70 20 3d 20 44 72 | 61 77 55 6e 47 72 6f 75 |oup = Dr|awUnGrou|
|00000d60| 70 57 69 6e 64 6f 77 3b | 0d 7d 0d 0d 0d 2f 2a 20 |pWindow;|.}.../* |
|00000d70| 68 61 6e 64 6c 65 20 6d | 6f 75 73 65 2d 6d 6f 76 |handle m|ouse-mov|
|00000d80| 65 64 20 65 76 65 6e 74 | 73 20 66 6f 72 20 64 72 |ed event|s for dr|
|00000d90| 61 77 20 77 69 6e 64 6f | 77 20 2a 2f 0d 0d 76 6f |aw windo|w */..vo|
|00000da0| 69 64 20 2a 44 72 61 77 | 46 69 78 43 75 72 73 6f |id *Draw|FixCurso|
|00000db0| 72 57 69 6e 64 6f 77 28 | 57 69 6e 64 6f 77 50 74 |rWindow(|WindowPt|
|00000dc0| 72 20 77 69 6e 64 6f 77 | 2c 57 49 6e 66 6f 50 74 |r window|,WInfoPt|
|00000dd0| 72 20 69 6e 66 6f 50 74 | 72 2c 76 6f 69 64 20 2a |r infoPt|r,void *|
|00000de0| 64 61 74 61 29 0d 7b 0d | 09 52 67 6e 48 61 6e 64 |data).{.|.RgnHand|
|00000df0| 6c 65 20 72 65 74 75 72 | 6e 52 67 6e 3b 0d 09 75 |le retur|nRgn;..u|
|00000e00| 6e 73 69 67 6e 65 64 20 | 6c 6f 6e 67 20 2a 63 72 |nsigned |long *cr|
|00000e10| 73 72 44 61 74 61 3b 0d | 09 52 67 6e 48 61 6e 64 |srData;.|.RgnHand|
|00000e20| 6c 65 20 61 72 72 6f 77 | 52 67 6e 2c 70 65 6e 63 |le arrow|Rgn,penc|
|00000e30| 69 6c 52 67 6e 3b 0d 09 | 50 6f 69 6e 74 20 6f 66 |ilRgn;..|Point of|
|00000e40| 66 73 65 74 50 74 2c 6d | 6f 75 73 65 50 74 3b 0d |fsetPt,m|ousePt;.|
|00000e50| 09 47 72 61 66 50 74 72 | 20 73 61 76 65 50 6f 72 |.GrafPtr| savePor|
|00000e60| 74 3b 0d 09 52 65 63 74 | 20 64 72 61 77 52 65 63 |t;..Rect| drawRec|
|00000e70| 74 3b 0d 09 0d 09 47 65 | 74 50 6f 72 74 28 26 73 |t;....Ge|tPort(&s|
|00000e80| 61 76 65 50 6f 72 74 29 | 3b 0d 09 53 65 74 50 6f |avePort)|;..SetPo|
|00000e90| 72 74 28 77 69 6e 64 6f | 77 29 3b 0d 09 09 0d 09 |rt(windo|w);.....|
|00000ea0| 63 72 73 72 44 61 74 61 | 20 3d 20 28 75 6e 73 69 |crsrData| = (unsi|
|00000eb0| 67 6e 65 64 20 6c 6f 6e | 67 20 2a 29 64 61 74 61 |gned lon|g *)data|
|00000ec0| 3b 0d 09 72 65 74 75 72 | 6e 52 67 6e 20 3d 20 28 |;..retur|nRgn = (|
|00000ed0| 52 67 6e 48 61 6e 64 6c | 65 29 63 72 73 72 44 61 |RgnHandl|e)crsrDa|
|00000ee0| 74 61 5b 31 5d 3b 0d 09 | 6d 6f 75 73 65 50 74 20 |ta[1];..|mousePt |
|00000ef0| 3d 20 2a 28 50 6f 69 6e | 74 20 2a 29 26 63 72 73 |= *(Poin|t *)&crs|
|00000f00| 72 44 61 74 61 5b 30 5d | 3b 0d 09 61 72 72 6f 77 |rData[0]|;..arrow|
|00000f10| 52 67 6e 20 3d 20 4e 65 | 77 52 67 6e 28 29 3b 0d |Rgn = Ne|wRgn();.|
|00000f20| 09 70 65 6e 63 69 6c 52 | 67 6e 20 3d 20 4e 65 77 |.pencilR|gn = New|
|00000f30| 52 67 6e 28 29 3b 0d 09 | 0d 09 64 72 61 77 52 65 |Rgn();..|..drawRe|
|00000f40| 63 74 20 3d 20 77 69 6e | 64 6f 77 2d 3e 70 6f 72 |ct = win|dow->por|
|00000f50| 74 52 65 63 74 3b 0d 09 | 64 72 61 77 52 65 63 74 |tRect;..|drawRect|
|00000f60| 2e 62 6f 74 74 6f 6d 20 | 2d 3d 20 31 35 3b 0d 09 |.bottom |-= 15;..|
|00000f70| 64 72 61 77 52 65 63 74 | 2e 72 69 67 68 74 20 2d |drawRect|.right -|
|00000f80| 3d 20 31 35 3b 0d 09 0d | 09 53 65 74 52 65 63 74 |= 15;...|.SetRect|
|00000f90| 52 67 6e 28 61 72 72 6f | 77 52 67 6e 2c 2d 33 32 |Rgn(arro|wRgn,-32|
|00000fa0| 37 36 38 2c 2d 33 32 37 | 36 38 2c 33 32 37 36 37 |768,-327|68,32767|
|00000fb0| 2c 33 32 37 36 37 29 3b | 0d 09 52 65 63 74 52 67 |,32767);|..RectRg|
|00000fc0| 6e 28 70 65 6e 63 69 6c | 52 67 6e 2c 26 64 72 61 |n(pencil|Rgn,&dra|
|00000fd0| 77 52 65 63 74 29 3b 0d | 09 53 65 74 50 74 28 26 |wRect);.|.SetPt(&|
|00000fe0| 6f 66 66 73 65 74 50 74 | 2c 30 2c 30 29 3b 0d 09 |offsetPt|,0,0);..|
|00000ff0| 4c 6f 63 61 6c 54 6f 47 | 6c 6f 62 61 6c 28 26 6f |LocalToG|lobal(&o|
|00001000| 66 66 73 65 74 50 74 29 | 3b 0d 09 4f 66 66 73 65 |ffsetPt)|;..Offse|
|00001010| 74 52 67 6e 28 70 65 6e | 63 69 6c 52 67 6e 2c 6f |tRgn(pen|cilRgn,o|
|00001020| 66 66 73 65 74 50 74 2e | 68 2c 6f 66 66 73 65 74 |ffsetPt.|h,offset|
|00001030| 50 74 2e 76 29 3b 0d 09 | 44 69 66 66 52 67 6e 28 |Pt.v);..|DiffRgn(|
|00001040| 61 72 72 6f 77 52 67 6e | 2c 70 65 6e 63 69 6c 52 |arrowRgn|,pencilR|
|00001050| 67 6e 2c 61 72 72 6f 77 | 52 67 6e 29 3b 0d 09 0d |gn,arrow|Rgn);...|
|00001060| 09 69 66 20 28 50 74 49 | 6e 52 67 6e 28 6d 6f 75 |.if (PtI|nRgn(mou|
|00001070| 73 65 50 74 2c 61 72 72 | 6f 77 52 67 6e 29 29 20 |sePt,arr|owRgn)) |
|00001080| 7b 0d 09 09 43 6f 70 79 | 52 67 6e 28 61 72 72 6f |{...Copy|Rgn(arro|
|00001090| 77 52 67 6e 2c 72 65 74 | 75 72 6e 52 67 6e 29 3b |wRgn,ret|urnRgn);|
|000010a0| 0d 09 09 53 65 74 43 75 | 72 73 6f 72 28 26 71 64 |...SetCu|rsor(&qd|
|000010b0| 2e 61 72 72 6f 77 29 3b | 0d 09 7d 0d 09 65 6c 73 |.arrow);|..}..els|
|000010c0| 65 20 69 66 20 28 50 74 | 49 6e 52 67 6e 28 6d 6f |e if (Pt|InRgn(mo|
|000010d0| 75 73 65 50 74 2c 70 65 | 6e 63 69 6c 52 67 6e 29 |usePt,pe|ncilRgn)|
|000010e0| 29 20 7b 0d 09 09 43 6f | 70 79 52 67 6e 28 70 65 |) {...Co|pyRgn(pe|
|000010f0| 6e 63 69 6c 52 67 6e 2c | 72 65 74 75 72 6e 52 67 |ncilRgn,|returnRg|
|00001100| 6e 29 3b 0d 09 09 69 66 | 20 28 67 43 75 72 72 65 |n);...if| (gCurre|
|00001110| 6e 74 53 68 61 70 65 21 | 3d 6b 53 65 6c 65 63 74 |ntShape!|=kSelect|
|00001120| 53 68 61 70 65 29 0d 09 | 09 09 53 65 74 43 75 72 |Shape)..|..SetCur|
|00001130| 73 6f 72 28 26 67 50 65 | 6e 63 69 6c 43 75 72 73 |sor(&gPe|ncilCurs|
|00001140| 6f 72 29 3b 0d 09 09 65 | 6c 73 65 0d 09 09 09 53 |or);...e|lse....S|
|00001150| 65 74 43 75 72 73 6f 72 | 28 26 71 64 2e 61 72 72 |etCursor|(&qd.arr|
|00001160| 6f 77 29 3b 0d 09 7d 0d | 0d 09 09 0d 09 44 69 73 |ow);..}.|.....Dis|
|00001170| 70 6f 73 65 52 67 6e 28 | 61 72 72 6f 77 52 67 6e |poseRgn(|arrowRgn|
|00001180| 29 3b 0d 09 44 69 73 70 | 6f 73 65 52 67 6e 28 70 |);..Disp|oseRgn(p|
|00001190| 65 6e 63 69 6c 52 67 6e | 29 3b 0d 09 53 65 74 50 |encilRgn|);..SetP|
|000011a0| 6f 72 74 28 73 61 76 65 | 50 6f 72 74 29 3b 0d 09 |ort(save|Port);..|
|000011b0| 0d 09 72 65 74 75 72 6e | 20 42 61 73 65 46 69 78 |..return| BaseFix|
|000011c0| 43 75 72 73 6f 72 57 69 | 6e 64 6f 77 28 77 69 6e |CursorWi|ndow(win|
|000011d0| 64 6f 77 2c 69 6e 66 6f | 50 74 72 2c 64 61 74 61 |dow,info|Ptr,data|
|000011e0| 29 3b 0d 7d 0d 0d 0d 2f | 2a 20 64 65 61 6c 6c 6f |);.}.../|* deallo|
|000011f0| 63 61 74 65 20 61 6e 79 | 20 6d 65 6d 6f 72 79 20 |cate any| memory |
|00001200| 61 73 73 6f 63 69 61 74 | 65 64 20 77 69 74 68 20 |associat|ed with |
|00001210| 74 68 65 20 64 72 61 77 | 20 77 69 6e 64 6f 77 20 |the draw| window |
|00001220| 63 6c 61 73 73 20 2a 2f | 0d 0d 76 6f 69 64 20 2a |class */|..void *|
|00001230| 44 72 61 77 44 65 73 74 | 72 6f 79 57 69 6e 64 6f |DrawDest|royWindo|
|00001240| 77 28 57 69 6e 64 6f 77 | 50 74 72 20 77 69 6e 64 |w(Window|Ptr wind|
|00001250| 6f 77 2c 57 49 6e 66 6f | 50 74 72 20 69 6e 66 6f |ow,WInfo|Ptr info|
|00001260| 50 74 72 2c 76 6f 69 64 | 20 2a 64 61 74 61 29 0d |Ptr,void| *data).|
|00001270| 7b 0d 09 53 68 61 70 65 | 4c 69 73 74 50 74 72 20 |{..Shape|ListPtr |
|00001280| 73 68 61 70 65 4c 69 73 | 74 2c 70 72 65 76 53 68 |shapeLis|t,prevSh|
|00001290| 61 70 65 3b 0d 09 4f 53 | 45 72 72 20 65 72 72 3b |ape;..OS|Err err;|
|000012a0| 0d 09 0d 09 44 53 49 47 | 43 6c 6f 73 65 46 69 6c |....DSIG|CloseFil|
|000012b0| 65 28 69 6e 66 6f 50 74 | 72 29 3b 0d 09 0d 09 69 |e(infoPt|r);....i|
|000012c0| 66 20 28 69 6e 66 6f 50 | 74 72 2d 3e 66 52 65 66 |f (infoP|tr->fRef|
|000012d0| 4e 75 6d 29 20 7b 0d 09 | 09 65 72 72 20 3d 20 46 |Num) {..|.err = F|
|000012e0| 53 43 6c 6f 73 65 28 69 | 6e 66 6f 50 74 72 2d 3e |SClose(i|nfoPtr->|
|000012f0| 66 52 65 66 4e 75 6d 29 | 3b 0d 09 09 69 66 20 28 |fRefNum)|;...if (|
|00001300| 65 72 72 21 3d 6e 6f 45 | 72 72 29 0d 09 09 09 44 |err!=noE|rr)....D|
|00001310| 6f 45 72 72 6f 72 28 65 | 72 72 29 3b 0d 09 09 69 |oError(e|rr);...i|
|00001320| 6e 66 6f 50 74 72 2d 3e | 66 52 65 66 4e 75 6d 20 |nfoPtr->|fRefNum |
|00001330| 3d 20 30 3b 0d 09 7d 0d | 09 0d 09 69 66 20 28 69 |= 0;..}.|...if (i|
|00001340| 6e 66 6f 50 74 72 2d 3e | 72 65 73 52 65 66 4e 75 |nfoPtr->|resRefNu|
|00001350| 6d 29 20 7b 0d 09 09 43 | 6c 6f 73 65 52 65 73 46 |m) {...C|loseResF|
|00001360| 69 6c 65 28 69 6e 66 6f | 50 74 72 2d 3e 72 65 73 |ile(info|Ptr->res|
|00001370| 52 65 66 4e 75 6d 29 3b | 0d 09 09 65 72 72 20 3d |RefNum);|...err =|
|00001380| 20 52 65 73 45 72 72 6f | 72 28 29 3b 0d 09 09 69 | ResErro|r();...i|
|00001390| 66 20 28 65 72 72 21 3d | 6e 6f 45 72 72 29 0d 09 |f (err!=|noErr)..|
|000013a0| 09 09 44 6f 45 72 72 6f | 72 28 65 72 72 29 3b 0d |..DoErro|r(err);.|
|000013b0| 09 09 69 6e 66 6f 50 74 | 72 2d 3e 72 65 73 52 65 |..infoPt|r->resRe|
|000013c0| 66 4e 75 6d 20 3d 20 30 | 3b 0d 09 7d 0d 09 09 0d |fNum = 0|;..}....|
|000013d0| 09 73 68 61 70 65 4c 69 | 73 74 20 3d 20 28 53 68 |.shapeLi|st = (Sh|
|000013e0| 61 70 65 4c 69 73 74 50 | 74 72 29 20 69 6e 66 6f |apeListP|tr) info|
|000013f0| 50 74 72 2d 3e 64 61 74 | 61 3b 0d 09 77 68 69 6c |Ptr->dat|a;..whil|
|00001400| 65 20 28 73 68 61 70 65 | 4c 69 73 74 29 20 7b 0d |e (shape|List) {.|
|00001410| 09 09 70 72 65 76 53 68 | 61 70 65 20 3d 20 73 68 |..prevSh|ape = sh|
|00001420| 61 70 65 4c 69 73 74 3b | 0d 09 09 73 68 61 70 65 |apeList;|...shape|
|00001430| 4c 69 73 74 20 3d 20 73 | 68 61 70 65 4c 69 73 74 |List = s|hapeList|
|00001440| 2d 3e 6e 65 78 74 3b 0d | 09 09 44 69 73 70 6f 73 |->next;.|..Dispos|
|00001450| 50 74 72 43 68 6b 28 70 | 72 65 76 53 68 61 70 65 |PtrChk(p|revShape|
|00001460| 29 3b 0d 09 7d 0d 09 0d | 09 44 69 73 70 6f 73 65 |);..}...|.Dispose|
|00001470| 43 6f 6e 74 72 6f 6c 28 | 56 53 43 52 4f 4c 4c 29 |Control(|VSCROLL)|
|00001480| 3b 0d 09 44 69 73 70 6f | 73 65 43 6f 6e 74 72 6f |;..Dispo|seContro|
|00001490| 6c 28 48 53 43 52 4f 4c | 4c 29 3b 0d 09 0d 09 72 |l(HSCROL|L);....r|
|000014a0| 65 74 75 72 6e 20 42 61 | 73 65 44 65 73 74 72 6f |eturn Ba|seDestro|
|000014b0| 79 57 69 6e 64 6f 77 28 | 77 69 6e 64 6f 77 2c 69 |yWindow(|window,i|
|000014c0| 6e 66 6f 50 74 72 2c 64 | 61 74 61 29 3b 0d 7d 0d |nfoPtr,d|ata);.}.|
|000014d0| 0d 0d 2f 2a 20 68 61 6e | 64 6c 65 20 75 6e 64 6f |../* han|dle undo|
|000014e0| 20 66 6f 72 20 64 72 61 | 77 20 77 69 6e 64 6f 77 | for dra|w window|
|000014f0| 20 2a 2f 0d 0d 76 6f 69 | 64 20 2a 44 72 61 77 55 | */..voi|d *DrawU|
|00001500| 6e 64 6f 57 69 6e 64 6f | 77 28 57 69 6e 64 6f 77 |ndoWindo|w(Window|
|00001510| 50 74 72 20 77 69 6e 64 | 6f 77 2c 57 49 6e 66 6f |Ptr wind|ow,WInfo|
|00001520| 50 74 72 20 69 6e 66 6f | 50 74 72 2c 76 6f 69 64 |Ptr info|Ptr,void|
|00001530| 20 2a 64 61 74 61 29 0d | 7b 0d 09 23 70 72 61 67 | *data).|{..#prag|
|00001540| 6d 61 20 75 6e 75 73 65 | 64 20 28 64 61 74 61 29 |ma unuse|d (data)|
|00001550| 0d 09 69 66 20 28 21 67 | 43 61 6e 55 6e 64 6f 20 |..if (!g|CanUndo |
|00001560| 7c 7c 20 77 69 6e 64 6f | 77 21 3d 67 55 6e 64 6f ||| windo|w!=gUndo|
|00001570| 43 6f 6d 6d 61 6e 64 2e | 77 69 6e 64 6f 77 29 20 |Command.|window) |
|00001580| 7b 0d 09 09 44 6f 45 72 | 72 6f 72 28 6b 49 6e 74 |{...DoEr|ror(kInt|
|00001590| 65 72 6e 61 6c 45 72 72 | 6f 72 29 3b 0d 09 09 72 |ernalErr|or);...r|
|000015a0| 65 74 75 72 6e 20 6e 69 | 6c 3b 0d 09 7d 0d 09 0d |eturn ni|l;..}...|
|000015b0| 09 69 66 20 28 67 48 61 | 73 55 6e 64 6f 29 20 7b |.if (gHa|sUndo) {|
|000015c0| 09 2f 2f 20 77 65 20 73 | 68 6f 75 6c 64 20 72 65 |.// we s|hould re|
|000015d0| 64 6f 0d 09 09 41 64 64 | 53 68 61 70 65 28 67 55 |do...Add|Shape(gU|
|000015e0| 6e 64 6f 43 6f 6d 6d 61 | 6e 64 2e 74 68 65 53 68 |ndoComma|nd.theSh|
|000015f0| 61 70 65 2e 73 68 61 70 | 65 54 79 70 65 2c 67 55 |ape.shap|eType,gU|
|00001600| 6e 64 6f 43 6f 6d 6d 61 | 6e 64 2e 74 68 65 53 68 |ndoComma|nd.theSh|
|00001610| 61 70 65 2e 61 6e 63 68 | 6f 72 2c 0d 09 09 09 09 |ape.anch|or,.....|
|00001620| 67 55 6e 64 6f 43 6f 6d | 6d 61 6e 64 2e 74 68 65 |gUndoCom|mand.the|
|00001630| 53 68 61 70 65 2e 64 65 | 73 74 69 6e 61 74 69 6f |Shape.de|stinatio|
|00001640| 6e 2c 6e 69 6c 2c 28 53 | 68 61 70 65 4c 69 73 74 |n,nil,(S|hapeList|
|00001650| 50 74 72 20 2a 29 26 69 | 6e 66 6f 50 74 72 2d 3e |Ptr *)&i|nfoPtr->|
|00001660| 64 61 74 61 2c 66 61 6c | 73 65 29 3b 0d 09 09 49 |data,fal|se);...I|
|00001670| 6e 76 61 6c 53 68 61 70 | 65 41 72 65 61 28 77 69 |nvalShap|eArea(wi|
|00001680| 6e 64 6f 77 2c 69 6e 66 | 6f 50 74 72 2c 28 53 68 |ndow,inf|oPtr,(Sh|
|00001690| 61 70 65 4c 69 73 74 50 | 74 72 29 69 6e 66 6f 50 |apeListP|tr)infoP|
|000016a0| 74 72 2d 3e 64 61 74 61 | 29 3b 0d 09 09 67 48 61 |tr->data|);...gHa|
|000016b0| 73 55 6e 64 6f 20 3d 20 | 66 61 6c 73 65 3b 0d 09 |sUndo = |false;..|
|000016c0| 7d 0d 09 65 6c 73 65 20 | 7b 0d 09 09 52 65 6d 6f |}..else |{...Remo|
|000016d0| 76 65 54 6f 70 53 68 61 | 70 65 28 77 69 6e 64 6f |veTopSha|pe(windo|
|000016e0| 77 2c 69 6e 66 6f 50 74 | 72 29 3b 0d 09 09 67 48 |w,infoPt|r);...gH|
|000016f0| 61 73 55 6e 64 6f 20 3d | 20 74 72 75 65 3b 0d 09 |asUndo =| true;..|
|00001700| 7d 0d 09 0d 09 53 65 74 | 75 70 41 70 70 55 6e 64 |}....Set|upAppUnd|
|00001710| 6f 28 29 3b 0d 09 72 65 | 74 75 72 6e 20 6e 69 6c |o();..re|turn nil|
|00001720| 3b 0d 7d 0d 0d 0d 2f 2a | 20 68 61 6e 64 6c 65 20 |;.}.../*| handle |
|00001730| 61 63 74 69 76 61 74 65 | 20 65 76 65 6e 74 73 20 |activate| events |
|00001740| 66 6f 72 20 64 72 61 77 | 20 77 69 6e 64 6f 77 20 |for draw| window |
|00001750| 2a 2f 0d 0d 76 6f 69 64 | 20 2a 44 72 61 77 41 63 |*/..void| *DrawAc|
|00001760| 74 69 76 61 74 65 57 69 | 6e 64 6f 77 28 57 69 6e |tivateWi|ndow(Win|
|00001770| 64 6f 77 50 74 72 20 77 | 69 6e 64 6f 77 2c 57 49 |dowPtr w|indow,WI|
|00001780| 6e 66 6f 50 74 72 20 69 | 6e 66 6f 50 74 72 2c 76 |nfoPtr i|nfoPtr,v|
|00001790| 6f 69 64 20 2a 64 61 74 | 61 29 0d 7b 0d 09 4d 65 |oid *dat|a).{..Me|
|000017a0| 6e 75 48 61 6e 64 6c 65 | 20 74 68 65 4d 65 6e 75 |nuHandle| theMenu|
|000017b0| 3b 0d 09 0d 09 44 69 73 | 61 62 6c 65 41 6c 6c 4d |;....Dis|ableAllM|
|000017c0| 65 6e 75 73 28 29 3b 0d | 09 0d 09 74 68 65 4d 65 |enus();.|...theMe|
|000017d0| 6e 75 20 3d 20 47 65 74 | 4d 48 61 6e 64 6c 65 28 |nu = Get|MHandle(|
|000017e0| 6b 46 69 6c 65 4d 65 6e | 75 29 3b 0d 09 45 6e 61 |kFileMen|u);..Ena|
|000017f0| 62 6c 65 41 6c 6c 4d 65 | 6e 75 49 74 65 6d 73 28 |bleAllMe|nuItems(|
|00001800| 74 68 65 4d 65 6e 75 29 | 3b 0d 09 69 66 20 28 21 |theMenu)|;..if (!|
|00001810| 69 6e 66 6f 50 74 72 2d | 3e 63 68 61 6e 67 65 64 |infoPtr-|>changed|
|00001820| 29 0d 09 09 44 69 73 61 | 62 6c 65 49 74 65 6d 28 |)...Disa|bleItem(|
|00001830| 74 68 65 4d 65 6e 75 2c | 6b 53 61 76 65 49 74 65 |theMenu,|kSaveIte|
|00001840| 6d 29 3b 0d 09 09 09 0d | 09 2f 2a 20 6f 6e 6c 79 |m);.....|./* only|
|00001850| 20 65 6e 61 62 6c 65 20 | 6d 61 69 6c 20 6d 65 6e | enable |mail men|
|00001860| 75 20 69 66 20 77 65 20 | 68 61 76 65 20 53 74 61 |u if we |have Sta|
|00001870| 6e 64 61 72 64 20 4d 61 | 69 6c 20 61 76 61 69 6c |ndard Ma|il avail|
|00001880| 61 62 6c 65 20 2a 2f 0d | 09 0d 09 69 66 20 28 67 |able */.|...if (g|
|00001890| 48 61 73 53 74 61 6e 64 | 61 72 64 4d 61 69 6c 29 |HasStand|ardMail)|
|000018a0| 20 7b 0d 09 09 74 68 65 | 4d 65 6e 75 20 3d 20 47 | {...the|Menu = G|
|000018b0| 65 74 4d 48 61 6e 64 6c | 65 28 6b 4d 61 69 6c 4d |etMHandl|e(kMailM|
|000018c0| 65 6e 75 29 3b 0d 09 09 | 45 6e 61 62 6c 65 41 6c |enu);...|EnableAl|
|000018d0| 6c 4d 65 6e 75 49 74 65 | 6d 73 28 74 68 65 4d 65 |lMenuIte|ms(theMe|
|000018e0| 6e 75 29 3b 0d 09 09 44 | 69 73 61 62 6c 65 49 74 |nu);...D|isableIt|
|000018f0| 65 6d 28 74 68 65 4d 65 | 6e 75 2c 6b 53 65 6e 64 |em(theMe|nu,kSend|
|00001900| 49 74 65 6d 29 3b 0d 09 | 09 44 69 73 61 62 6c 65 |Item);..|.Disable|
|00001910| 49 74 65 6d 28 74 68 65 | 4d 65 6e 75 2c 6b 52 65 |Item(the|Menu,kRe|
|00001920| 70 6c 79 49 74 65 6d 29 | 3b 0d 09 09 44 69 73 61 |plyItem)|;...Disa|
|00001930| 62 6c 65 49 74 65 6d 28 | 74 68 65 4d 65 6e 75 2c |bleItem(|theMenu,|
|00001940| 6b 52 65 70 6c 79 54 6f | 41 6c 6c 49 74 65 6d 29 |kReplyTo|AllItem)|
|00001950| 3b 0d 09 09 44 69 73 61 | 62 6c 65 49 74 65 6d 28 |;...Disa|bleItem(|
|00001960| 74 68 65 4d 65 6e 75 2c | 6b 46 6f 72 77 61 72 64 |theMenu,|kForward|
|00001970| 49 74 65 6d 29 3b 0d 09 | 09 44 69 73 61 62 6c 65 |Item);..|.Disable|
|00001980| 49 74 65 6d 28 74 68 65 | 4d 65 6e 75 2c 6b 54 61 |Item(the|Menu,kTa|
|00001990| 67 4c 65 74 74 65 72 49 | 74 65 6d 29 3b 0d 09 7d |gLetterI|tem);..}|
|000019a0| 0d 09 0d 09 46 69 78 44 | 72 61 77 4d 65 6e 75 73 |....FixD|rawMenus|
|000019b0| 28 69 6e 66 6f 50 74 72 | 29 3b 0d 09 0d 09 67 4d |(infoPtr|);....gM|
|000019c0| 65 6e 75 73 44 69 72 74 | 79 20 3d 20 74 72 75 65 |enusDirt|y = true|
|000019d0| 3b 0d 0d 09 48 69 6c 69 | 74 65 43 6f 6e 74 72 6f |;...Hili|teContro|
|000019e0| 6c 28 56 53 43 52 4f 4c | 4c 2c 30 29 3b 0d 09 48 |l(VSCROL|L,0);..H|
|000019f0| 69 6c 69 74 65 43 6f 6e | 74 72 6f 6c 28 48 53 43 |iliteCon|trol(HSC|
|00001a00| 52 4f 4c 4c 2c 30 29 3b | 0d 0d 09 72 65 74 75 72 |ROLL,0);|...retur|
|00001a10| 6e 20 42 61 73 65 41 63 | 74 69 76 61 74 65 57 69 |n BaseAc|tivateWi|
|00001a20| 6e 64 6f 77 28 77 69 6e | 64 6f 77 2c 69 6e 66 6f |ndow(win|dow,info|
|00001a30| 50 74 72 2c 64 61 74 61 | 29 3b 0d 7d 0d 0d 0d 2f |Ptr,data|);.}.../|
|00001a40| 2a 20 68 61 6e 64 6c 65 | 20 64 65 61 63 74 69 76 |* handle| deactiv|
|00001a50| 61 74 65 20 65 76 65 6e | 74 73 20 66 6f 72 20 64 |ate even|ts for d|
|00001a60| 72 61 77 20 77 69 6e 64 | 6f 77 20 2a 2f 0d 0d 76 |raw wind|ow */..v|
|00001a70| 6f 69 64 20 2a 44 72 61 | 77 44 65 61 63 74 69 76 |oid *Dra|wDeactiv|
|00001a80| 61 74 65 57 69 6e 64 6f | 77 28 57 69 6e 64 6f 77 |ateWindo|w(Window|
|00001a90| 50 74 72 20 77 69 6e 64 | 6f 77 2c 57 49 6e 66 6f |Ptr wind|ow,WInfo|
|00001aa0| 50 74 72 20 69 6e 66 6f | 50 74 72 2c 76 6f 69 64 |Ptr info|Ptr,void|
|00001ab0| 20 2a 64 61 74 61 29 0d | 7b 0d 09 48 69 6c 69 74 | *data).|{..Hilit|
|00001ac0| 65 43 6f 6e 74 72 6f 6c | 28 56 53 43 52 4f 4c 4c |eControl|(VSCROLL|
|00001ad0| 2c 32 35 34 29 3b 0d 09 | 48 69 6c 69 74 65 43 6f |,254);..|HiliteCo|
|00001ae0| 6e 74 72 6f 6c 28 48 53 | 43 52 4f 4c 4c 2c 32 35 |ntrol(HS|CROLL,25|
|00001af0| 34 29 3b 0d 0d 09 72 65 | 74 75 72 6e 20 42 61 73 |4);...re|turn Bas|
|00001b00| 65 44 65 61 63 74 69 76 | 61 74 65 57 69 6e 64 6f |eDeactiv|ateWindo|
|00001b10| 77 28 77 69 6e 64 6f 77 | 2c 69 6e 66 6f 50 74 72 |w(window|,infoPtr|
|00001b20| 2c 64 61 74 61 29 3b 0d | 7d 0d 0d 0d 2f 2a 20 68 |,data);.|}.../* h|
|00001b30| 61 6e 64 6c 65 20 6d 6f | 75 73 65 20 63 6c 69 63 |andle mo|use clic|
|00001b40| 6b 20 69 6e 20 63 6f 6e | 74 65 6e 74 20 66 6f 72 |k in con|tent for|
|00001b50| 20 64 72 61 77 20 77 69 | 6e 64 6f 77 20 2a 2f 0d | draw wi|ndow */.|
|00001b60| 0d 76 6f 69 64 20 2a 44 | 72 61 77 43 6c 69 63 6b |.void *D|rawClick|
|00001b70| 57 69 6e 64 6f 77 28 57 | 69 6e 64 6f 77 50 74 72 |Window(W|indowPtr|
|00001b80| 20 77 69 6e 64 6f 77 2c | 57 49 6e 66 6f 50 74 72 | window,|WInfoPtr|
|00001b90| 20 69 6e 66 6f 50 74 72 | 2c 76 6f 69 64 20 2a 64 | infoPtr|,void *d|
|00001ba0| 61 74 61 29 0d 7b 0d 09 | 47 72 61 66 50 74 72 20 |ata).{..|GrafPtr |
|00001bb0| 73 61 76 65 50 6f 72 74 | 3b 0d 09 52 67 6e 48 61 |savePort|;..RgnHa|
|00001bc0| 6e 64 6c 65 20 73 61 76 | 65 52 67 6e 2c 77 69 6e |ndle sav|eRgn,win|
|00001bd0| 64 6f 77 52 67 6e 3b 0d | 09 4d 65 6e 75 48 61 6e |dowRgn;.|.MenuHan|
|00001be0| 64 6c 65 20 74 68 65 4d | 65 6e 75 3b 0d 09 42 6f |dle theM|enu;..Bo|
|00001bf0| 6f 6c 65 61 6e 20 63 68 | 61 6e 67 65 64 3b 0d 09 |olean ch|anged;..|
|00001c00| 0d 09 63 68 61 6e 67 65 | 64 20 3d 20 66 61 6c 73 |..change|d = fals|
|00001c10| 65 3b 0d 09 0d 09 47 65 | 74 50 6f 72 74 28 26 73 |e;....Ge|tPort(&s|
|00001c20| 61 76 65 50 6f 72 74 29 | 3b 0d 09 53 65 74 50 6f |avePort)|;..SetPo|
|00001c30| 72 74 28 77 69 6e 64 6f | 77 29 3b 0d 0d 09 77 69 |rt(windo|w);...wi|
|00001c40| 6e 64 6f 77 52 67 6e 20 | 3d 20 47 65 74 53 63 72 |ndowRgn |= GetScr|
|00001c50| 6f 6c 6c 65 72 73 52 67 | 6e 28 26 77 69 6e 64 6f |ollersRg|n(&windo|
|00001c60| 77 2d 3e 70 6f 72 74 52 | 65 63 74 29 3b 0d 09 0d |w->portR|ect);...|
|00001c70| 09 73 61 76 65 52 67 6e | 20 3d 20 4e 65 77 52 67 |.saveRgn| = NewRg|
|00001c80| 6e 28 29 3b 0d 09 47 65 | 74 43 6c 69 70 28 73 61 |n();..Ge|tClip(sa|
|00001c90| 76 65 52 67 6e 29 3b 0d | 09 44 69 66 66 52 67 6e |veRgn);.|.DiffRgn|
|00001ca0| 28 73 61 76 65 52 67 6e | 2c 77 69 6e 64 6f 77 52 |(saveRgn|,windowR|
|00001cb0| 67 6e 2c 77 69 6e 64 6f | 77 52 67 6e 29 3b 0d 09 |gn,windo|wRgn);..|
|00001cc0| 53 65 74 43 6c 69 70 28 | 77 69 6e 64 6f 77 52 67 |SetClip(|windowRg|
|00001cd0| 6e 29 3b 0d 0d 09 69 66 | 20 28 67 43 75 72 72 65 |n);...if| (gCurre|
|00001ce0| 6e 74 53 68 61 70 65 3d | 3d 6b 53 65 6c 65 63 74 |ntShape=|=kSelect|
|00001cf0| 53 68 61 70 65 29 20 7b | 0d 09 09 63 68 61 6e 67 |Shape) {|...chang|
|00001d00| 65 64 20 3d 20 57 61 72 | 70 45 78 69 73 74 69 6e |ed = War|pExistin|
|00001d10| 67 53 68 61 70 65 28 77 | 69 6e 64 6f 77 2c 69 6e |gShape(w|indow,in|
|00001d20| 66 6f 50 74 72 2c 28 28 | 45 76 65 6e 74 52 65 63 |foPtr,((|EventRec|
|00001d30| 6f 72 64 20 2a 29 64 61 | 74 61 29 2d 3e 77 68 65 |ord *)da|ta)->whe|
|00001d40| 72 65 2c 0d 09 09 09 28 | 28 28 45 76 65 6e 74 52 |re,....(|((EventR|
|00001d50| 65 63 6f 72 64 20 2a 29 | 64 61 74 61 29 2d 3e 6d |ecord *)|data)->m|
|00001d60| 6f 64 69 66 69 65 72 73 | 20 26 20 73 68 69 66 74 |odifiers| & shift|
|00001d70| 4b 65 79 29 21 3d 30 29 | 3b 0d 09 09 69 66 20 28 |Key)!=0)|;...if (|
|00001d80| 63 68 61 6e 67 65 64 29 | 0d 09 09 09 43 6c 65 61 |changed)|....Clea|
|00001d90| 72 41 70 70 55 6e 64 6f | 28 29 3b 0d 09 7d 0d 09 |rAppUndo|();..}..|
|00001da0| 65 6c 73 65 20 7b 0d 09 | 09 45 6e 74 65 72 4e 65 |else {..|.EnterNe|
|00001db0| 77 53 68 61 70 65 28 77 | 69 6e 64 6f 77 2c 69 6e |wShape(w|indow,in|
|00001dc0| 66 6f 50 74 72 2c 28 28 | 45 76 65 6e 74 52 65 63 |foPtr,((|EventRec|
|00001dd0| 6f 72 64 20 2a 29 64 61 | 74 61 29 2d 3e 77 68 65 |ord *)da|ta)->whe|
|00001de0| 72 65 29 3b 0d 09 09 63 | 68 61 6e 67 65 64 20 3d |re);...c|hanged =|
|00001df0| 20 74 72 75 65 3b 0d 09 | 7d 0d 09 0d 09 53 65 74 | true;..|}....Set|
|00001e00| 43 6c 69 70 28 73 61 76 | 65 52 67 6e 29 3b 0d 09 |Clip(sav|eRgn);..|
|00001e10| 44 69 73 70 6f 73 65 52 | 67 6e 28 73 61 76 65 52 |DisposeR|gn(saveR|
|00001e20| 67 6e 29 3b 09 0d 09 44 | 69 73 70 6f 73 65 52 67 |gn);...D|isposeRg|
|00001e30| 6e 28 77 69 6e 64 6f 77 | 52 67 6e 29 3b 0d 09 53 |n(window|Rgn);..S|
|00001e40| 65 74 50 6f 72 74 28 73 | 61 76 65 50 6f 72 74 29 |etPort(s|avePort)|
|00001e50| 3b 0d 0d 09 46 69 78 44 | 72 61 77 4d 65 6e 75 73 |;...FixD|rawMenus|
|00001e60| 28 69 6e 66 6f 50 74 72 | 29 3b 0d 09 74 68 65 4d |(infoPtr|);..theM|
|00001e70| 65 6e 75 20 3d 20 47 65 | 74 4d 48 61 6e 64 6c 65 |enu = Ge|tMHandle|
|00001e80| 28 6b 46 69 6c 65 4d 65 | 6e 75 29 3b 09 2f 2f 20 |(kFileMe|nu);.// |
|00001e90| 6e 6f 77 20 77 65 27 76 | 65 20 63 68 61 6e 67 65 |now we'v|e change|
|00001ea0| 64 2c 20 73 6f 20 74 68 | 65 20 75 73 65 72 20 63 |d, so th|e user c|
|00001eb0| 61 6e 20 73 61 76 65 0d | 09 45 6e 61 62 6c 65 49 |an save.|.EnableI|
|00001ec0| 74 65 6d 28 74 68 65 4d | 65 6e 75 2c 6b 53 61 76 |tem(theM|enu,kSav|
|00001ed0| 65 49 74 65 6d 29 3b 0d | 09 0d 09 69 6e 66 6f 50 |eItem);.|...infoP|
|00001ee0| 74 72 2d 3e 63 68 61 6e | 67 65 64 20 7c 3d 20 63 |tr->chan|ged |= c|
|00001ef0| 68 61 6e 67 65 64 3b 0d | 09 72 65 74 75 72 6e 20 |hanged;.|.return |
|00001f00| 6e 69 6c 3b 0d 7d 0d 0d | 0d 2f 2a 20 68 61 6e 64 |nil;.}..|./* hand|
|00001f10| 6c 65 20 75 70 64 61 74 | 65 20 65 76 65 6e 74 73 |le updat|e events|
|00001f20| 20 66 6f 72 20 64 72 61 | 77 20 77 69 6e 64 6f 77 | for dra|w window|
|00001f30| 20 2a 2f 0d 0d 76 6f 69 | 64 20 2a 44 72 61 77 55 | */..voi|d *DrawU|
|00001f40| 70 64 61 74 65 57 69 6e | 64 6f 77 28 57 69 6e 64 |pdateWin|dow(Wind|
|00001f50| 6f 77 50 74 72 20 77 69 | 6e 64 6f 77 2c 57 49 6e |owPtr wi|ndow,WIn|
|00001f60| 66 6f 50 74 72 20 69 6e | 66 6f 50 74 72 2c 76 6f |foPtr in|foPtr,vo|
|00001f70| 69 64 20 2a 64 61 74 61 | 29 0d 7b 0d 09 52 67 6e |id *data|).{..Rgn|
|00001f80| 48 61 6e 64 6c 65 20 73 | 61 76 65 52 67 6e 2c 77 |Handle s|aveRgn,w|
|00001f90| 69 6e 64 6f 77 52 67 6e | 3b 0d 09 50 6f 69 6e 74 |indowRgn|;..Point|
|00001fa0| 20 2a 73 63 72 6f 6c 6c | 50 6f 73 2c 6f 66 66 73 | *scroll|Pos,offs|
|00001fb0| 65 74 50 6f 73 3b 0d 09 | 0d 09 73 63 72 6f 6c 6c |etPos;..|..scroll|
|00001fc0| 50 6f 73 20 3d 20 28 50 | 6f 69 6e 74 2a 29 26 69 |Pos = (P|oint*)&i|
|00001fd0| 6e 66 6f 50 74 72 2d 3e | 6f 74 68 65 72 44 61 74 |nfoPtr->|otherDat|
|00001fe0| 61 5b 6b 56 69 65 77 4f | 66 66 73 65 74 5d 3b 0d |a[kViewO|ffset];.|
|00001ff0| 09 6f 66 66 73 65 74 50 | 6f 73 2e 68 20 3d 20 69 |.offsetP|os.h = i|
|00002000| 6e 66 6f 50 74 72 2d 3e | 6c 65 66 74 49 6e 64 65 |nfoPtr->|leftInde|
|00002010| 6e 74 20 2d 20 73 63 72 | 6f 6c 6c 50 6f 73 2d 3e |nt - scr|ollPos->|
|00002020| 68 3b 0d 09 6f 66 66 73 | 65 74 50 6f 73 2e 76 20 |h;..offs|etPos.v |
|00002030| 3d 20 69 6e 66 6f 50 74 | 72 2d 3e 74 6f 70 49 6e |= infoPt|r->topIn|
|00002040| 64 65 6e 74 20 2d 20 73 | 63 72 6f 6c 6c 50 6f 73 |dent - s|crollPos|
|00002050| 2d 3e 76 3b 0d 09 0d 09 | 73 61 76 65 52 67 6e 20 |->v;....|saveRgn |
|00002060| 3d 20 4e 65 77 52 67 6e | 28 29 3b 0d 09 77 69 6e |= NewRgn|();..win|
|00002070| 64 6f 77 52 67 6e 20 3d | 20 47 65 74 53 63 72 6f |dowRgn =| GetScro|
|00002080| 6c 6c 65 72 73 52 67 6e | 28 26 77 69 6e 64 6f 77 |llersRgn|(&window|
|00002090| 2d 3e 70 6f 72 74 52 65 | 63 74 29 3b 0d 0d 09 47 |->portRe|ct);...G|
|000020a0| 65 74 43 6c 69 70 28 73 | 61 76 65 52 67 6e 29 3b |etClip(s|aveRgn);|
|000020b0| 0d 09 44 69 66 66 52 67 | 6e 28 73 61 76 65 52 67 |..DiffRg|n(saveRg|
|000020c0| 6e 2c 77 69 6e 64 6f 77 | 52 67 6e 2c 77 69 6e 64 |n,window|Rgn,wind|
|000020d0| 6f 77 52 67 6e 29 3b 0d | 09 53 65 74 43 6c 69 70 |owRgn);.|.SetClip|
|000020e0| 28 77 69 6e 64 6f 77 52 | 67 6e 29 3b 0d 09 0d 09 |(windowR|gn);....|
|000020f0| 44 72 61 77 41 6c 6c 53 | 68 61 70 65 73 28 69 6e |DrawAllS|hapes(in|
|00002100| 66 6f 50 74 72 2c 6f 66 | 66 73 65 74 50 6f 73 29 |foPtr,of|fsetPos)|
|00002110| 3b 0d 09 0d 09 53 65 74 | 43 6c 69 70 28 73 61 76 |;....Set|Clip(sav|
|00002120| 65 52 67 6e 29 3b 0d 09 | 44 69 73 70 6f 73 65 52 |eRgn);..|DisposeR|
|00002130| 67 6e 28 73 61 76 65 52 | 67 6e 29 3b 0d 09 44 69 |gn(saveR|gn);..Di|
|00002140| 73 70 6f 73 65 52 67 6e | 28 77 69 6e 64 6f 77 52 |sposeRgn|(windowR|
|00002150| 67 6e 29 3b 0d 09 0d 09 | 55 70 64 74 43 6f 6e 74 |gn);....|UpdtCont|
|00002160| 72 6f 6c 28 77 69 6e 64 | 6f 77 2c 77 69 6e 64 6f |rol(wind|ow,windo|
|00002170| 77 2d 3e 76 69 73 52 67 | 6e 29 3b 0d 09 0d 09 72 |w->visRg|n);....r|
|00002180| 65 74 75 72 6e 20 42 61 | 73 65 55 70 64 61 74 65 |eturn Ba|seUpdate|
|00002190| 57 69 6e 64 6f 77 28 77 | 69 6e 64 6f 77 2c 69 6e |Window(w|indow,in|
|000021a0| 66 6f 50 74 72 2c 64 61 | 74 61 29 3b 0d 7d 0d 0d |foPtr,da|ta);.}..|
|000021b0| 0d 2f 2a 20 68 61 6e 64 | 6c 65 20 77 69 6e 64 6f |./* hand|le windo|
|000021c0| 77 20 72 65 73 69 7a 65 | 20 66 6f 72 20 64 72 61 |w resize| for dra|
|000021d0| 77 20 77 69 6e 64 6f 77 | 20 2a 2f 0d 0d 76 6f 69 |w window| */..voi|
|000021e0| 64 20 2a 44 72 61 77 52 | 65 73 69 7a 65 57 69 6e |d *DrawR|esizeWin|
|000021f0| 64 6f 77 28 57 69 6e 64 | 6f 77 50 74 72 20 77 69 |dow(Wind|owPtr wi|
|00002200| 6e 64 6f 77 2c 57 49 6e | 66 6f 50 74 72 20 69 6e |ndow,WIn|foPtr in|
|00002210| 66 6f 50 74 72 2c 76 6f | 69 64 20 2a 64 61 74 61 |foPtr,vo|id *data|
|00002220| 29 0d 7b 09 0d 09 23 70 | 72 61 67 6d 61 20 75 6e |).{...#p|ragma un|
|00002230| 75 73 65 64 20 28 69 6e | 66 6f 50 74 72 29 0d 09 |used (in|foPtr)..|
|00002240| 52 65 63 74 20 2a 6f 6c | 64 53 69 7a 65 2c 67 62 |Rect *ol|dSize,gb|
|00002250| 52 65 63 74 3b 0d 09 0d | 09 6f 6c 64 53 69 7a 65 |Rect;...|.oldSize|
|00002260| 20 3d 20 28 52 65 63 74 | 20 2a 29 64 61 74 61 3b | = (Rect| *)data;|
|00002270| 0d 09 67 62 52 65 63 74 | 20 3d 20 2a 6f 6c 64 53 |..gbRect| = *oldS|
|00002280| 69 7a 65 3b 0d 09 67 62 | 52 65 63 74 2e 74 6f 70 |ize;..gb|Rect.top|
|00002290| 20 3d 20 67 62 52 65 63 | 74 2e 62 6f 74 74 6f 6d | = gbRec|t.bottom|
|000022a0| 20 2d 20 6b 47 72 6f 77 | 42 6f 78 57 69 64 74 68 | - kGrow|BoxWidth|
|000022b0| 3b 0d 09 67 62 52 65 63 | 74 2e 6c 65 66 74 20 3d |;..gbRec|t.left =|
|000022c0| 20 67 62 52 65 63 74 2e | 72 69 67 68 74 20 2d 20 | gbRect.|right - |
|000022d0| 6b 47 72 6f 77 42 6f 78 | 57 69 64 74 68 3b 0d 09 |kGrowBox|Width;..|
|000022e0| 45 72 61 73 65 52 65 63 | 74 28 26 67 62 52 65 63 |EraseRec|t(&gbRec|
|000022f0| 74 29 3b 0d 0d 09 4d 6f | 76 65 53 63 72 6f 6c 6c |t);...Mo|veScroll|
|00002300| 42 61 72 73 28 77 69 6e | 64 6f 77 29 3b 0d 09 0d |Bars(win|dow);...|
|00002310| 09 67 62 52 65 63 74 20 | 3d 20 77 69 6e 64 6f 77 |.gbRect |= window|
|00002320| 2d 3e 70 6f 72 74 52 65 | 63 74 3b 0d 09 67 62 52 |->portRe|ct;..gbR|
|00002330| 65 63 74 2e 74 6f 70 20 | 3d 20 67 62 52 65 63 74 |ect.top |= gbRect|
|00002340| 2e 62 6f 74 74 6f 6d 20 | 2d 20 6b 47 72 6f 77 42 |.bottom |- kGrowB|
|00002350| 6f 78 57 69 64 74 68 3b | 0d 09 67 62 52 65 63 74 |oxWidth;|..gbRect|
|00002360| 2e 6c 65 66 74 20 3d 20 | 67 62 52 65 63 74 2e 72 |.left = |gbRect.r|
|00002370| 69 67 68 74 20 2d 20 6b | 47 72 6f 77 42 6f 78 57 |ight - k|GrowBoxW|
|00002380| 69 64 74 68 3b 0d 09 56 | 61 6c 69 64 52 65 63 74 |idth;..V|alidRect|
|00002390| 28 26 67 62 52 65 63 74 | 29 3b 0d 09 4d 79 44 72 |(&gbRect|);..MyDr|
|000023a0| 61 77 47 72 6f 77 49 63 | 6f 6e 28 77 69 6e 64 6f |awGrowIc|on(windo|
|000023b0| 77 29 3b 0d 0d 09 72 65 | 74 75 72 6e 20 6e 69 6c |w);...re|turn nil|
|000023c0| 3b 0d 7d 0d 0d 0d 2f 2a | 20 68 61 6e 64 6c 65 20 |;.}.../*| handle |
|000023d0| 70 72 69 6e 74 20 66 6f | 72 20 64 72 61 77 20 77 |print fo|r draw w|
|000023e0| 69 6e 64 6f 77 20 2a 2f | 0d 0d 76 6f 69 64 20 2a |indow */|..void *|
|000023f0| 44 72 61 77 50 72 69 6e | 74 57 69 6e 64 6f 77 28 |DrawPrin|tWindow(|
|00002400| 57 69 6e 64 6f 77 50 74 | 72 20 77 69 6e 64 6f 77 |WindowPt|r window|
|00002410| 2c 57 49 6e 66 6f 50 74 | 72 20 69 6e 66 6f 50 74 |,WInfoPt|r infoPt|
|00002420| 72 2c 76 6f 69 64 20 2a | 64 61 74 61 29 0d 7b 0d |r,void *|data).{.|
|00002430| 09 23 70 72 61 67 6d 61 | 20 75 6e 75 73 65 64 20 |.#pragma| unused |
|00002440| 28 77 69 6e 64 6f 77 2c | 64 61 74 61 29 0d 09 42 |(window,|data)..B|
|00002450| 6f 6f 6c 65 61 6e 20 73 | 68 6f 75 6c 64 43 6f 6e |oolean s|houldCon|
|00002460| 74 69 6e 75 65 3b 0d 20 | 20 20 20 54 50 50 72 50 |tinue;. | TPPrP|
|00002470| 6f 72 74 20 74 68 65 50 | 72 50 6f 72 74 3b 0d 20 |ort theP|rPort;. |
|00002480| 20 20 20 54 50 72 53 74 | 61 74 75 73 20 74 68 65 | TPrSt|atus the|
|00002490| 53 74 61 74 75 73 3b 0d | 09 50 6f 69 6e 74 20 7a |Status;.|.Point z|
|000024a0| 65 72 6f 4f 66 66 73 65 | 74 20 3d 20 7b 30 2c 30 |eroOffse|t = {0,0|
|000024b0| 7d 3b 0d 09 0d 09 2f 2f | 20 6f 70 65 6e 20 70 72 |};....//| open pr|
|000024c0| 69 6e 74 20 64 72 69 76 | 65 72 0d 09 0d 09 50 72 |int driv|er....Pr|
|000024d0| 4f 70 65 6e 28 29 3b 0d | 09 69 66 20 28 50 72 45 |Open();.|.if (PrE|
|000024e0| 72 72 6f 72 28 29 21 3d | 6e 6f 45 72 72 29 20 7b |rror()!=|noErr) {|
|000024f0| 0d 09 09 44 6f 45 72 72 | 6f 72 28 50 72 45 72 72 |...DoErr|or(PrErr|
|00002500| 6f 72 28 29 29 3b 0d 09 | 09 72 65 74 75 72 6e 20 |or());..|.return |
|00002510| 6e 69 6c 3b 0d 09 7d 0d | 09 0d 09 2f 2f 20 64 69 |nil;..}.|...// di|
|00002520| 73 70 6c 61 79 20 70 72 | 69 6e 74 20 64 69 61 6c |splay pr|int dial|
|00002530| 6f 67 0d 09 0d 09 53 65 | 74 43 75 72 73 6f 72 28 |og....Se|tCursor(|
|00002540| 26 71 64 2e 61 72 72 6f | 77 29 3b 0d 09 73 68 6f |&qd.arro|w);..sho|
|00002550| 75 6c 64 43 6f 6e 74 69 | 6e 75 65 20 3d 20 50 72 |uldConti|nue = Pr|
|00002560| 4a 6f 62 44 69 61 6c 6f | 67 28 69 6e 66 6f 50 74 |JobDialo|g(infoPt|
|00002570| 72 2d 3e 70 72 69 6e 74 | 52 65 63 6f 72 64 29 3b |r->print|Record);|
|00002580| 0d 09 69 66 20 28 50 72 | 45 72 72 6f 72 28 29 21 |..if (Pr|Error()!|
|00002590| 3d 6e 6f 45 72 72 29 20 | 7b 0d 09 09 44 6f 45 72 |=noErr) |{...DoEr|
|000025a0| 72 6f 72 28 50 72 45 72 | 72 6f 72 28 29 29 3b 0d |ror(PrEr|ror());.|
|000025b0| 09 09 72 65 74 75 72 6e | 20 6e 69 6c 3b 0d 09 7d |..return| nil;..}|
|000025c0| 0d 09 69 66 20 28 21 73 | 68 6f 75 6c 64 43 6f 6e |..if (!s|houldCon|
|000025d0| 74 69 6e 75 65 29 0d 09 | 09 72 65 74 75 72 6e 20 |tinue)..|.return |
|000025e0| 6e 69 6c 3b 0d 09 0d 09 | 2f 2f 20 69 6e 69 74 20 |nil;....|// init |
|000025f0| 70 72 69 6e 74 69 6e 67 | 20 67 72 61 66 70 6f 72 |printing| grafpor|
|00002600| 74 0d 09 0d 09 74 68 65 | 50 72 50 6f 72 74 20 3d |t....the|PrPort =|
|00002610| 20 50 72 4f 70 65 6e 44 | 6f 63 28 69 6e 66 6f 50 | PrOpenD|oc(infoP|
|00002620| 74 72 2d 3e 70 72 69 6e | 74 52 65 63 6f 72 64 2c |tr->prin|tRecord,|
|00002630| 6e 69 6c 2c 6e 69 6c 29 | 3b 0d 09 69 66 20 28 50 |nil,nil)|;..if (P|
|00002640| 72 45 72 72 6f 72 28 29 | 3d 3d 6e 6f 45 72 72 29 |rError()|==noErr)|
|00002650| 20 7b 0d 09 09 50 72 4f | 70 65 6e 50 61 67 65 28 | {...PrO|penPage(|
|00002660| 74 68 65 50 72 50 6f 72 | 74 2c 6e 69 6c 29 3b 0d |thePrPor|t,nil);.|
|00002670| 09 09 69 66 20 28 50 72 | 45 72 72 6f 72 28 29 3d |..if (Pr|Error()=|
|00002680| 3d 6e 6f 45 72 72 29 0d | 09 09 09 44 72 61 77 41 |=noErr).|...DrawA|
|00002690| 6c 6c 53 68 61 70 65 73 | 28 69 6e 66 6f 50 74 72 |llShapes|(infoPtr|
|000026a0| 2c 7a 65 72 6f 4f 66 66 | 73 65 74 29 3b 0d 09 09 |,zeroOff|set);...|
|000026b0| 50 72 43 6c 6f 73 65 50 | 61 67 65 28 74 68 65 50 |PrCloseP|age(theP|
|000026c0| 72 50 6f 72 74 29 3b 0d | 09 7d 0d 09 50 72 43 6c |rPort);.|.}..PrCl|
|000026d0| 6f 73 65 44 6f 63 28 74 | 68 65 50 72 50 6f 72 74 |oseDoc(t|hePrPort|
|000026e0| 29 3b 0d 09 0d 20 20 20 | 20 69 66 20 28 28 28 28 |);... | if ((((|
|000026f0| 54 50 50 72 69 6e 74 29 | 2a 28 69 6e 66 6f 50 74 |TPPrint)|*(infoPt|
|00002700| 72 2d 3e 70 72 69 6e 74 | 52 65 63 6f 72 64 29 29 |r->print|Record))|
|00002710| 2d 3e 70 72 4a 6f 62 2e | 62 4a 44 6f 63 4c 6f 6f |->prJob.|bJDocLoo|
|00002720| 70 3d 3d 62 53 70 6f 6f | 6c 4c 6f 6f 70 29 20 26 |p==bSpoo|lLoop) &|
|00002730| 26 20 28 50 72 45 72 72 | 6f 72 28 29 20 3d 3d 20 |& (PrErr|or() == |
|00002740| 6e 6f 45 72 72 29 29 0d | 20 20 20 20 20 20 20 20 |noErr)).| |
|00002750| 50 72 50 69 63 46 69 6c | 65 28 69 6e 66 6f 50 74 |PrPicFil|e(infoPt|
|00002760| 72 2d 3e 70 72 69 6e 74 | 52 65 63 6f 72 64 2c 20 |r->print|Record, |
|00002770| 6e 69 6c 2c 20 6e 69 6c | 2c 20 6e 69 6c 2c 20 26 |nil, nil|, nil, &|
|00002780| 74 68 65 53 74 61 74 75 | 73 29 3b 20 20 20 20 20 |theStatu|s); |
|00002790| 20 20 20 20 20 20 20 20 | 20 20 20 0d 0d 09 2f 2f | | ...//|
|000027a0| 20 63 6c 6f 73 65 20 70 | 72 69 6e 74 20 64 72 69 | close p|rint dri|
|000027b0| 76 65 72 0d 09 0d 09 50 | 72 43 6c 6f 73 65 28 29 |ver....P|rClose()|
|000027c0| 3b 0d 09 0d 09 72 65 74 | 75 72 6e 20 6e 69 6c 3b |;....ret|urn nil;|
|000027d0| 0d 7d 0d 0d 0d 2f 2a 20 | 68 61 6e 64 6c 65 20 70 |.}.../* |handle p|
|000027e0| 61 67 65 20 73 65 74 75 | 70 20 66 6f 72 20 64 72 |age setu|p for dr|
|000027f0| 61 77 20 77 69 6e 64 6f | 77 20 2a 2f 0d 0d 76 6f |aw windo|w */..vo|
|00002800| 69 64 20 2a 44 72 61 77 | 50 61 67 65 53 65 74 75 |id *Draw|PageSetu|
|00002810| 70 57 69 6e 64 6f 77 28 | 57 69 6e 64 6f 77 50 74 |pWindow(|WindowPt|
|00002820| 72 20 77 69 6e 64 6f 77 | 2c 57 49 6e 66 6f 50 74 |r window|,WInfoPt|
|00002830| 72 20 69 6e 66 6f 50 74 | 72 2c 76 6f 69 64 20 2a |r infoPt|r,void *|
|00002840| 64 61 74 61 29 0d 7b 0d | 09 42 6f 6f 6c 65 61 6e |data).{.|.Boolean|
|00002850| 20 63 68 61 6e 67 65 64 | 3b 0d 09 0d 09 63 68 61 | changed|;....cha|
|00002860| 6e 67 65 64 20 3d 20 43 | 68 65 63 6b 50 61 67 65 |nged = C|heckPage|
|00002870| 53 69 7a 65 28 77 69 6e | 64 6f 77 2c 69 6e 66 6f |Size(win|dow,info|
|00002880| 50 74 72 29 3b 0d 09 69 | 66 20 28 21 63 68 61 6e |Ptr);..i|f (!chan|
|00002890| 67 65 64 29 0d 09 09 52 | 65 43 61 6c 63 53 63 72 |ged)...R|eCalcScr|
|000028a0| 6f 6c 6c 42 61 72 73 28 | 77 69 6e 64 6f 77 2c 69 |ollBars(|window,i|
|000028b0| 6e 66 6f 50 74 72 29 3b | 0d 0d 09 72 65 74 75 72 |nfoPtr);|...retur|
|000028c0| 6e 20 42 61 73 65 50 61 | 67 65 53 65 74 75 70 57 |n BasePa|geSetupW|
|000028d0| 69 6e 64 6f 77 28 77 69 | 6e 64 6f 77 2c 69 6e 66 |indow(wi|ndow,inf|
|000028e0| 6f 50 74 72 2c 64 61 74 | 61 29 3b 0d 7d 0d 0d 0d |oPtr,dat|a);.}...|
|000028f0| 2f 2a 20 68 61 6e 64 6c | 65 20 73 61 76 65 20 66 |/* handl|e save f|
|00002900| 6f 72 20 64 72 61 77 20 | 77 69 6e 64 6f 77 20 2a |or draw |window *|
|00002910| 2f 0d 0d 76 6f 69 64 20 | 2a 44 72 61 77 53 61 76 |/..void |*DrawSav|
|00002920| 65 57 69 6e 64 6f 77 28 | 57 69 6e 64 6f 77 50 74 |eWindow(|WindowPt|
|00002930| 72 20 77 69 6e 64 6f 77 | 2c 57 49 6e 66 6f 50 74 |r window|,WInfoPt|
|00002940| 72 20 69 6e 66 6f 50 74 | 72 2c 76 6f 69 64 20 2a |r infoPt|r,void *|
|00002950| 64 61 74 61 29 0d 7b 0d | 09 4f 53 45 72 72 20 65 |data).{.|.OSErr e|
|00002960| 72 72 3b 0d 09 53 4d 50 | 53 61 76 65 54 79 70 65 |rr;..SMP|SaveType|
|00002970| 20 73 61 76 65 48 6f 77 | 3b 0d 09 73 68 6f 72 74 | saveHow|;..short|
|00002980| 20 66 52 65 66 4e 75 6d | 2c 72 65 73 52 65 66 4e | fRefNum|,resRefN|
|00002990| 75 6d 3b 0d 09 0d 09 73 | 61 76 65 48 6f 77 20 3d |um;....s|aveHow =|
|000029a0| 20 28 53 4d 50 53 61 76 | 65 54 79 70 65 29 64 61 | (SMPSav|eType)da|
|000029b0| 74 61 3b 0d 09 0d 09 2f | 2f 20 68 61 6e 64 6c 65 |ta;..../|/ handle|
|000029c0| 20 73 61 76 65 20 61 73 | 0d 09 0d 09 69 66 20 28 | save as|....if (|
|000029d0| 73 61 76 65 48 6f 77 3d | 3d 6b 53 4d 50 53 61 76 |saveHow=|=kSMPSav|
|000029e0| 65 41 73 29 20 7b 0d 09 | 0d 09 09 2f 2f 20 63 72 |eAs) {..|...// cr|
|000029f0| 65 61 74 65 20 74 68 65 | 20 6e 65 77 20 66 69 6c |eate the| new fil|
|00002a00| 65 2c 20 64 65 6c 65 74 | 69 6e 67 20 61 6e 79 20 |e, delet|ing any |
|00002a10| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 2c 20 61 |existing| file, a|
|00002a20| 73 20 70 65 72 20 75 73 | 65 72 27 73 20 73 74 64 |s per us|er's std|
|00002a30| 20 66 69 6c 65 20 72 65 | 71 75 65 73 74 0d 09 09 | file re|quest...|
|00002a40| 0d 09 09 65 72 72 20 3d | 20 46 53 70 43 72 65 61 |...err =| FSpCrea|
|00002a50| 74 65 28 26 69 6e 66 6f | 50 74 72 2d 3e 66 69 6c |te(&info|Ptr->fil|
|00002a60| 65 53 70 65 63 2c 6b 41 | 70 70 43 72 65 61 74 6f |eSpec,kA|ppCreato|
|00002a70| 72 2c 6b 44 72 61 77 69 | 6e 67 54 79 70 65 2c 73 |r,kDrawi|ngType,s|
|00002a80| 6d 52 6f 6d 61 6e 29 3b | 0d 09 09 69 66 20 28 65 |mRoman);|...if (e|
|00002a90| 72 72 3d 3d 64 75 70 46 | 4e 45 72 72 29 20 7b 0d |rr==dupF|NErr) {.|
|00002aa0| 09 09 09 46 53 70 44 65 | 6c 65 74 65 28 26 69 6e |...FSpDe|lete(&in|
|00002ab0| 66 6f 50 74 72 2d 3e 66 | 69 6c 65 53 70 65 63 29 |foPtr->f|ileSpec)|
|00002ac0| 3b 0d 09 09 09 65 72 72 | 20 3d 20 46 53 70 43 72 |;....err| = FSpCr|
|00002ad0| 65 61 74 65 28 26 69 6e | 66 6f 50 74 72 2d 3e 66 |eate(&in|foPtr->f|
|00002ae0| 69 6c 65 53 70 65 63 2c | 6b 41 70 70 43 72 65 61 |ileSpec,|kAppCrea|
|00002af0| 74 6f 72 2c 6b 44 72 61 | 77 69 6e 67 54 79 70 65 |tor,kDra|wingType|
|00002b00| 2c 73 6d 52 6f 6d 61 6e | 29 3b 0d 09 09 7d 0d 09 |,smRoman|);...}..|
|00002b10| 09 69 66 20 28 65 72 72 | 21 3d 6e 6f 45 72 72 29 |.if (err|!=noErr)|
|00002b20| 20 7b 0d 09 09 09 44 6f | 45 72 72 6f 72 28 65 72 | {....Do|Error(er|
|00002b30| 72 29 3b 0d 09 09 09 72 | 65 74 75 72 6e 20 6e 69 |r);....r|eturn ni|
|00002b40| 6c 3b 0d 09 09 7d 0d 09 | 09 46 53 70 43 72 65 61 |l;...}..|.FSpCrea|
|00002b50| 74 65 52 65 73 46 69 6c | 65 28 26 69 6e 66 6f 50 |teResFil|e(&infoP|
|00002b60| 74 72 2d 3e 66 69 6c 65 | 53 70 65 63 2c 6b 41 70 |tr->file|Spec,kAp|
|00002b70| 70 43 72 65 61 74 6f 72 | 2c 6b 44 72 61 77 69 6e |pCreator|,kDrawin|
|00002b80| 67 54 79 70 65 2c 73 6d | 52 6f 6d 61 6e 29 3b 0d |gType,sm|Roman);.|
|00002b90| 09 09 65 72 72 20 3d 20 | 52 65 73 45 72 72 6f 72 |..err = |ResError|
|00002ba0| 28 29 3b 0d 09 09 69 66 | 20 28 65 72 72 21 3d 6e |();...if| (err!=n|
|00002bb0| 6f 45 72 72 29 20 7b 0d | 09 09 09 46 53 70 44 65 |oErr) {.|...FSpDe|
|00002bc0| 6c 65 74 65 28 26 69 6e | 66 6f 50 74 72 2d 3e 66 |lete(&in|foPtr->f|
|00002bd0| 69 6c 65 53 70 65 63 29 | 3b 0d 09 09 09 44 6f 45 |ileSpec)|;....DoE|
|00002be0| 72 72 6f 72 28 65 72 72 | 29 3b 0d 09 09 09 72 65 |rror(err|);....re|
|00002bf0| 74 75 72 6e 20 6e 69 6c | 3b 0d 09 09 7d 0d 09 09 |turn nil|;...}...|
|00002c00| 09 0d 09 09 2f 2f 20 6f | 70 65 6e 20 74 68 65 20 |....// o|pen the |
|00002c10| 6e 65 77 20 66 69 6c 65 | 20 28 64 61 74 61 20 66 |new file| (data f|
|00002c20| 6f 72 6b 29 0d 09 09 0d | 09 09 65 72 72 20 3d 20 |ork)....|..err = |
|00002c30| 46 53 70 4f 70 65 6e 44 | 46 28 26 69 6e 66 6f 50 |FSpOpenD|F(&infoP|
|00002c40| 74 72 2d 3e 66 69 6c 65 | 53 70 65 63 2c 66 73 52 |tr->file|Spec,fsR|
|00002c50| 64 57 72 50 65 72 6d 2c | 26 66 52 65 66 4e 75 6d |dWrPerm,|&fRefNum|
|00002c60| 29 3b 0d 09 09 69 66 20 | 28 65 72 72 21 3d 6e 6f |);...if |(err!=no|
|00002c70| 45 72 72 29 20 7b 0d 09 | 09 09 46 53 70 44 65 6c |Err) {..|..FSpDel|
|00002c80| 65 74 65 28 26 69 6e 66 | 6f 50 74 72 2d 3e 66 69 |ete(&inf|oPtr->fi|
|00002c90| 6c 65 53 70 65 63 29 3b | 0d 09 09 09 44 6f 45 72 |leSpec);|....DoEr|
|00002ca0| 72 6f 72 28 65 72 72 29 | 3b 0d 09 09 09 72 65 74 |ror(err)|;....ret|
|00002cb0| 75 72 6e 20 6e 69 6c 3b | 0d 09 09 7d 0d 09 09 0d |urn nil;|...}....|
|00002cc0| 09 09 2f 2f 20 6f 70 65 | 6e 20 74 68 65 20 6e 65 |..// ope|n the ne|
|00002cd0| 77 20 66 69 6c 65 20 28 | 72 65 73 6f 75 72 63 65 |w file (|resource|
|00002ce0| 20 66 6f 72 6b 29 0d 09 | 09 0d 09 09 72 65 73 52 | fork)..|....resR|
|00002cf0| 65 66 4e 75 6d 20 3d 20 | 46 53 70 4f 70 65 6e 52 |efNum = |FSpOpenR|
|00002d00| 65 73 46 69 6c 65 28 26 | 69 6e 66 6f 50 74 72 2d |esFile(&|infoPtr-|
|00002d10| 3e 66 69 6c 65 53 70 65 | 63 2c 66 73 52 64 57 72 |>fileSpe|c,fsRdWr|
|00002d20| 50 65 72 6d 29 3b 0d 09 | 09 65 72 72 20 3d 20 52 |Perm);..|.err = R|
|00002d30| 65 73 45 72 72 6f 72 28 | 29 3b 0d 09 09 69 66 20 |esError(|);...if |
|00002d40| 28 65 72 72 21 3d 6e 6f | 45 72 72 29 20 7b 0d 09 |(err!=no|Err) {..|
|00002d50| 09 09 46 53 43 6c 6f 73 | 65 28 66 52 65 66 4e 75 |..FSClos|e(fRefNu|
|00002d60| 6d 29 3b 0d 09 09 09 46 | 53 70 44 65 6c 65 74 65 |m);....F|SpDelete|
|00002d70| 28 26 69 6e 66 6f 50 74 | 72 2d 3e 66 69 6c 65 53 |(&infoPt|r->fileS|
|00002d80| 70 65 63 29 3b 0d 09 09 | 09 44 6f 45 72 72 6f 72 |pec);...|.DoError|
|00002d90| 28 65 72 72 29 3b 0d 09 | 09 09 72 65 74 75 72 6e |(err);..|..return|
|00002da0| 20 6e 69 6c 3b 0d 09 09 | 7d 0d 09 09 0d 09 09 2f | nil;...|}....../|
|00002db0| 2f 20 63 6c 6f 73 65 20 | 74 68 65 20 6f 6c 64 20 |/ close |the old |
|00002dc0| 66 69 6c 65 2c 20 69 66 | 20 69 74 20 65 78 69 73 |file, if| it exis|
|00002dd0| 74 73 0d 09 09 0d 09 09 | 69 66 20 28 69 6e 66 6f |ts......|if (info|
|00002de0| 50 74 72 2d 3e 66 52 65 | 66 4e 75 6d 29 0d 09 09 |Ptr->fRe|fNum)...|
|00002df0| 09 46 53 43 6c 6f 73 65 | 28 69 6e 66 6f 50 74 72 |.FSClose|(infoPtr|
|00002e00| 2d 3e 66 52 65 66 4e 75 | 6d 29 3b 0d 09 09 09 0d |->fRefNu|m);.....|
|00002e10| 09 09 2f 2f 20 73 74 6f | 72 65 20 74 68 65 20 6e |..// sto|re the n|
|00002e20| 65 77 20 66 52 65 66 4e | 75 6d 20 69 6e 74 6f 20 |ew fRefN|um into |
|00002e30| 74 68 65 20 64 6f 63 75 | 6d 65 6e 74 20 64 61 74 |the docu|ment dat|
|00002e40| 61 20 73 74 72 75 63 74 | 75 72 65 0d 09 09 0d 09 |a struct|ure.....|
|00002e50| 09 69 6e 66 6f 50 74 72 | 2d 3e 66 52 65 66 4e 75 |.infoPtr|->fRefNu|
|00002e60| 6d 20 3d 20 66 52 65 66 | 4e 75 6d 3b 0d 09 7d 0d |m = fRef|Num;..}.|
|00002e70| 09 65 6c 73 65 0d 09 09 | 72 65 73 52 65 66 4e 75 |.else...|resRefNu|
|00002e80| 6d 20 3d 20 69 6e 66 6f | 50 74 72 2d 3e 72 65 73 |m = info|Ptr->res|
|00002e90| 52 65 66 4e 75 6d 3b 0d | 09 0d 09 2f 2f 20 61 64 |RefNum;.|...// ad|
|00002ea0| 64 20 64 69 67 69 74 61 | 6c 20 73 69 67 6e 61 74 |d digita|l signat|
|00002eb0| 75 72 65 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 0d |ure info|rmation.|
|00002ec0| 09 0d 09 44 53 49 47 53 | 61 76 65 46 69 6c 65 28 |...DSIGS|aveFile(|
|00002ed0| 69 6e 66 6f 50 74 72 2c | 72 65 73 52 65 66 4e 75 |infoPtr,|resRefNu|
|00002ee0| 6d 2c 66 61 6c 73 65 29 | 3b 0d 09 69 66 20 28 73 |m,false)|;..if (s|
|00002ef0| 61 76 65 48 6f 77 3d 3d | 6b 53 4d 50 53 61 76 65 |aveHow==|kSMPSave|
|00002f00| 41 73 29 20 7b 0d 09 09 | 69 66 20 28 69 6e 66 6f |As) {...|if (info|
|00002f10| 50 74 72 2d 3e 72 65 73 | 52 65 66 4e 75 6d 29 0d |Ptr->res|RefNum).|
|00002f20| 09 09 09 43 6c 6f 73 65 | 52 65 73 46 69 6c 65 28 |...Close|ResFile(|
|00002f30| 69 6e 66 6f 50 74 72 2d | 3e 72 65 73 52 65 66 4e |infoPtr-|>resRefN|
|00002f40| 75 6d 29 3b 0d 09 09 69 | 6e 66 6f 50 74 72 2d 3e |um);...i|nfoPtr->|
|00002f50| 72 65 73 52 65 66 4e 75 | 6d 20 3d 20 72 65 73 52 |resRefNu|m = resR|
|00002f60| 65 66 4e 75 6d 3b 0d 09 | 7d 0d 09 0d 09 2f 2f 20 |efNum;..|}....// |
|00002f70| 73 61 76 65 20 74 68 65 | 20 61 63 74 75 61 6c 20 |save the| actual |
|00002f80| 66 69 6c 65 0d 09 0d 09 | 65 72 72 20 3d 20 53 61 |file....|err = Sa|
|00002f90| 76 65 44 72 61 77 69 6e | 67 54 6f 44 69 73 6b 28 |veDrawin|gToDisk(|
|00002fa0| 69 6e 66 6f 50 74 72 2d | 3e 66 52 65 66 4e 75 6d |infoPtr-|>fRefNum|
|00002fb0| 2c 69 6e 66 6f 50 74 72 | 29 3b 0d 09 69 66 20 28 |,infoPtr|);..if (|
|00002fc0| 65 72 72 21 3d 6e 6f 45 | 72 72 29 20 7b 0d 09 09 |err!=noE|rr) {...|
|00002fd0| 44 6f 45 72 72 6f 72 28 | 65 72 72 29 3b 0d 09 09 |DoError(|err);...|
|00002fe0| 72 65 74 75 72 6e 20 6e | 69 6c 3b 0d 09 7d 0d 09 |return n|il;..}..|
|00002ff0| 0d 09 53 65 74 57 54 69 | 74 6c 65 28 77 69 6e 64 |..SetWTi|tle(wind|
|00003000| 6f 77 2c 69 6e 66 6f 50 | 74 72 2d 3e 66 69 6c 65 |ow,infoP|tr->file|
|00003010| 53 70 65 63 2e 6e 61 6d | 65 29 3b 09 0d 09 72 65 |Spec.nam|e);...re|
|00003020| 74 75 72 6e 20 42 61 73 | 65 53 61 76 65 57 69 6e |turn Bas|eSaveWin|
|00003030| 64 6f 77 28 77 69 6e 64 | 6f 77 2c 69 6e 66 6f 50 |dow(wind|ow,infoP|
|00003040| 74 72 2c 64 61 74 61 29 | 3b 0d 7d 0d 0d 0d 2f 2a |tr,data)|;.}.../*|
|00003050| 20 68 61 6e 64 6c 65 20 | 6c 6f 61 64 20 66 6f 72 | handle |load for|
|00003060| 20 64 72 61 77 20 77 69 | 6e 64 6f 77 20 2a 2f 0d | draw wi|ndow */.|
|00003070| 0d 76 6f 69 64 20 2a 44 | 72 61 77 4c 6f 61 64 57 |.void *D|rawLoadW|
|00003080| 69 6e 64 6f 77 28 57 69 | 6e 64 6f 77 50 74 72 20 |indow(Wi|ndowPtr |
|00003090| 77 69 6e 64 6f 77 2c 57 | 49 6e 66 6f 50 74 72 20 |window,W|InfoPtr |
|000030a0| 69 6e 66 6f 50 74 72 2c | 76 6f 69 64 20 2a 64 61 |infoPtr,|void *da|
|000030b0| 74 61 29 0d 7b 0d 09 4f | 53 45 72 72 20 65 72 72 |ta).{..O|SErr err|
|000030c0| 3b 0d 09 6c 6f 6e 67 20 | 63 6f 75 6e 74 3b 0d 09 |;..long |count;..|
|000030d0| 73 68 6f 72 74 20 66 52 | 65 66 4e 75 6d 2c 72 65 |short fR|efNum,re|
|000030e0| 73 52 65 66 4e 75 6d 3b | 0d 09 46 53 53 70 65 63 |sRefNum;|..FSSpec|
|000030f0| 20 2a 66 53 70 65 63 3b | 0d 09 63 68 61 72 20 68 | *fSpec;|..char h|
|00003100| 53 74 61 74 65 3b 0d 09 | 0d 09 66 53 70 65 63 20 |State;..|..fSpec |
|00003110| 3d 20 64 61 74 61 3b 0d | 09 0d 09 2f 2f 20 6f 70 |= data;.|...// op|
|00003120| 65 6e 20 74 68 65 20 66 | 69 6c 65 2e 20 20 77 65 |en the f|ile. we|
|00003130| 20 6c 65 61 76 65 20 69 | 74 20 6f 70 65 6e 20 66 | leave i|t open f|
|00003140| 6f 72 20 72 65 61 64 69 | 6e 67 20 61 6e 64 20 77 |or readi|ng and w|
|00003150| 72 69 74 69 6e 67 20 74 | 68 65 20 77 68 6f 6c 65 |riting t|he whole|
|00003160| 20 74 69 6d 65 0d 09 2f | 2f 20 74 68 61 74 20 77 | time../|/ that w|
|00003170| 65 20 6e 65 65 64 20 74 | 6f 20 72 65 61 64 20 73 |e need t|o read s|
|00003180| 74 75 66 66 20 6f 75 74 | 20 6f 66 20 69 74 2e 0d |tuff out| of it..|
|00003190| 09 0d 09 65 72 72 20 3d | 20 46 53 70 4f 70 65 6e |...err =| FSpOpen|
|000031a0| 44 46 28 66 53 70 65 63 | 2c 66 73 52 64 57 72 50 |DF(fSpec|,fsRdWrP|
|000031b0| 65 72 6d 2c 26 66 52 65 | 66 4e 75 6d 29 3b 09 2f |erm,&fRe|fNum);./|
|000031c0| 2f 20 77 65 20 6c 65 61 | 76 65 20 74 68 65 20 66 |/ we lea|ve the f|
|000031d0| 69 6c 65 20 6f 70 65 6e | 0d 09 69 66 20 28 65 72 |ile open|..if (er|
|000031e0| 72 21 3d 6e 6f 45 72 72 | 29 20 7b 0d 09 09 44 6f |r!=noErr|) {...Do|
|000031f0| 45 72 72 6f 72 28 65 72 | 72 29 3b 0d 09 09 72 65 |Error(er|r);...re|
|00003200| 74 75 72 6e 20 6e 69 6c | 3b 0d 09 7d 0d 09 69 6e |turn nil|;..}..in|
|00003210| 66 6f 50 74 72 2d 3e 66 | 52 65 66 4e 75 6d 20 3d |foPtr->f|RefNum =|
|00003220| 20 66 52 65 66 4e 75 6d | 3b 0d 09 72 65 73 52 65 | fRefNum|;..resRe|
|00003230| 66 4e 75 6d 20 3d 20 46 | 53 70 4f 70 65 6e 52 65 |fNum = F|SpOpenRe|
|00003240| 73 46 69 6c 65 28 66 53 | 70 65 63 2c 66 73 52 64 |sFile(fS|pec,fsRd|
|00003250| 57 72 50 65 72 6d 29 3b | 0d 09 65 72 72 20 3d 20 |WrPerm);|..err = |
|00003260| 52 65 73 45 72 72 6f 72 | 28 29 3b 0d 09 69 66 20 |ResError|();..if |
|00003270| 28 65 72 72 21 3d 6e 6f | 45 72 72 29 20 7b 0d 09 |(err!=no|Err) {..|
|00003280| 09 46 53 43 6c 6f 73 65 | 28 66 52 65 66 4e 75 6d |.FSClose|(fRefNum|
|00003290| 29 3b 0d 09 09 44 6f 45 | 72 72 6f 72 28 65 72 72 |);...DoE|rror(err|
|000032a0| 29 3b 0d 09 09 72 65 74 | 75 72 6e 20 6e 69 6c 3b |);...ret|urn nil;|
|000032b0| 0d 09 7d 0d 09 69 6e 66 | 6f 50 74 72 2d 3e 72 65 |..}..inf|oPtr->re|
|000032c0| 73 52 65 66 4e 75 6d 20 | 3d 20 72 65 73 52 65 66 |sRefNum |= resRef|
|000032d0| 4e 75 6d 3b 0d 0d 09 2f | 2f 20 72 65 61 64 20 70 |Num;.../|/ read p|
|000032e0| 72 69 6e 74 20 72 65 63 | 6f 72 64 0d 09 0d 09 63 |rint rec|ord....c|
|000032f0| 6f 75 6e 74 20 3d 20 73 | 69 7a 65 6f 66 28 54 50 |ount = s|izeof(TP|
|00003300| 72 69 6e 74 29 3b 0d 09 | 68 53 74 61 74 65 20 3d |rint);..|hState =|
|00003310| 20 48 47 65 74 53 74 61 | 74 65 28 28 48 61 6e 64 | HGetSta|te((Hand|
|00003320| 6c 65 29 69 6e 66 6f 50 | 74 72 2d 3e 70 72 69 6e |le)infoP|tr->prin|
|00003330| 74 52 65 63 6f 72 64 29 | 3b 0d 09 48 4c 6f 63 6b |tRecord)|;..HLock|
|00003340| 28 28 48 61 6e 64 6c 65 | 29 69 6e 66 6f 50 74 72 |((Handle|)infoPtr|
|00003350| 2d 3e 70 72 69 6e 74 52 | 65 63 6f 72 64 29 3b 0d |->printR|ecord);.|
|00003360| 09 65 72 72 20 3d 20 46 | 53 52 65 61 64 28 66 52 |.err = F|SRead(fR|
|00003370| 65 66 4e 75 6d 2c 26 63 | 6f 75 6e 74 2c 2a 28 69 |efNum,&c|ount,*(i|
|00003380| 6e 66 6f 50 74 72 2d 3e | 70 72 69 6e 74 52 65 63 |nfoPtr->|printRec|
|00003390| 6f 72 64 29 29 3b 0d 09 | 48 53 65 74 53 74 61 74 |ord));..|HSetStat|
|000033a0| 65 28 28 48 61 6e 64 6c | 65 29 69 6e 66 6f 50 74 |e((Handl|e)infoPt|
|000033b0| 72 2d 3e 70 72 69 6e 74 | 52 65 63 6f 72 64 2c 68 |r->print|Record,h|
|000033c0| 53 74 61 74 65 29 3b 0d | 09 69 66 20 28 65 72 72 |State);.|.if (err|
|000033d0| 21 3d 6e 6f 45 72 72 29 | 20 7b 0d 09 09 44 6f 45 |!=noErr)| {...DoE|
|000033e0| 72 72 6f 72 28 65 72 72 | 29 3b 0d 09 09 72 65 74 |rror(err|);...ret|
|000033f0| 75 72 6e 20 6e 69 6c 3b | 0d 09 7d 0d 09 0d 09 2f |urn nil;|..}..../|
|00003400| 2f 20 72 65 61 64 20 73 | 68 61 70 65 20 69 6e 66 |/ read s|hape inf|
|00003410| 6f 72 6d 61 74 69 6f 6e | 0d 09 0d 09 4c 6f 61 64 |ormation|....Load|
|00003420| 53 68 61 70 65 73 46 72 | 6f 6d 44 69 73 6b 28 66 |ShapesFr|omDisk(f|
|00003430| 52 65 66 4e 75 6d 2c 28 | 53 68 61 70 65 4c 69 73 |RefNum,(|ShapeLis|
|00003440| 74 50 74 72 20 2a 29 26 | 69 6e 66 6f 50 74 72 2d |tPtr *)&|infoPtr-|
|00003450| 3e 64 61 74 61 29 3b 0d | 09 0d 09 2f 2f 20 64 6f |>data);.|...// do|
|00003460| 20 64 69 67 69 74 61 6c | 20 73 69 67 6e 61 74 75 | digital| signatu|
|00003470| 72 65 20 73 74 75 66 66 | 0d 09 0d 09 44 53 49 47 |re stuff|....DSIG|
|00003480| 4f 70 65 6e 46 69 6c 65 | 28 69 6e 66 6f 50 74 72 |OpenFile|(infoPtr|
|00003490| 29 3b 0d 09 0d 09 42 61 | 73 65 4c 6f 61 64 57 69 |);....Ba|seLoadWi|
|000034a0| 6e 64 6f 77 28 77 69 6e | 64 6f 77 2c 69 6e 66 6f |ndow(win|dow,info|
|000034b0| 50 74 72 2c 64 61 74 61 | 29 3b 0d 7d 0d 0d 0d 2f |Ptr,data|);.}.../|
|000034c0| 2a 20 68 61 6e 64 6c 65 | 20 63 6f 6e 74 72 6f 6c |* handle| control|
|000034d0| 20 68 69 74 20 28 69 6e | 20 73 63 72 6f 6c 6c 20 | hit (in| scroll |
|000034e0| 62 61 72 73 29 20 66 6f | 72 20 64 72 61 77 20 77 |bars) fo|r draw w|
|000034f0| 69 6e 64 6f 77 20 2a 2f | 0d 0d 76 6f 69 64 20 2a |indow */|..void *|
|00003500| 44 72 61 77 48 69 74 43 | 6f 6e 74 72 6f 6c 57 69 |DrawHitC|ontrolWi|
|00003510| 6e 64 6f 77 28 57 69 6e | 64 6f 77 50 74 72 20 77 |ndow(Win|dowPtr w|
|00003520| 69 6e 64 6f 77 2c 57 49 | 6e 66 6f 50 74 72 20 69 |indow,WI|nfoPtr i|
|00003530| 6e 66 6f 50 74 72 2c 76 | 6f 69 64 20 2a 64 61 74 |nfoPtr,v|oid *dat|
|00003540| 61 29 0d 7b 0d 09 43 6f | 6e 74 72 6f 6c 48 69 74 |a).{..Co|ntrolHit|
|00003550| 4d 65 73 73 61 67 65 20 | 2a 6d 73 67 3b 0d 09 73 |Message |*msg;..s|
|00003560| 68 6f 72 74 20 6e 65 77 | 56 61 6c 75 65 2c 6f 6c |hort new|Value,ol|
|00003570| 64 56 61 6c 75 65 3b 0d | 09 50 6f 69 6e 74 20 6d |dValue;.|.Point m|
|00003580| 6f 75 73 65 50 6f 73 3b | 0d 09 0d 09 6d 73 67 20 |ousePos;|....msg |
|00003590| 3d 20 28 43 6f 6e 74 72 | 6f 6c 48 69 74 4d 65 73 |= (Contr|olHitMes|
|000035a0| 73 61 67 65 20 2a 29 64 | 61 74 61 3b 0d 09 6d 6f |sage *)d|ata;..mo|
|000035b0| 75 73 65 50 6f 73 20 3d | 20 6d 73 67 2d 3e 65 76 |usePos =| msg->ev|
|000035c0| 2d 3e 77 68 65 72 65 3b | 0d 09 47 6c 6f 62 61 6c |->where;|..Global|
|000035d0| 54 6f 4c 6f 63 61 6c 28 | 26 6d 6f 75 73 65 50 6f |ToLocal(|&mousePo|
|000035e0| 73 29 3b 0d 09 0d 09 73 | 77 69 74 63 68 20 28 6d |s);....s|witch (m|
|000035f0| 73 67 2d 3e 70 61 72 74 | 29 20 7b 0d 09 09 63 61 |sg->part|) {...ca|
|00003600| 73 65 20 69 6e 50 61 67 | 65 55 70 3a 0d 09 09 63 |se inPag|eUp:...c|
|00003610| 61 73 65 20 69 6e 50 61 | 67 65 44 6f 77 6e 3a 0d |ase inPa|geDown:.|
|00003620| 09 09 09 54 72 61 63 6b | 43 6f 6e 74 72 6f 6c 28 |...Track|Control(|
|00003630| 6d 73 67 2d 3e 63 6f 6e | 74 72 6f 6c 2c 6d 6f 75 |msg->con|trol,mou|
|00003640| 73 65 50 6f 73 2c 28 50 | 72 6f 63 50 74 72 29 53 |sePos,(P|rocPtr)S|
|00003650| 63 72 6f 6c 6c 41 63 74 | 69 6f 6e 50 72 6f 63 29 |crollAct|ionProc)|
|00003660| 3b 0d 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 63 61 |;....bre|ak;...ca|
|00003670| 73 65 20 69 6e 55 70 42 | 75 74 74 6f 6e 3a 0d 09 |se inUpB|utton:..|
|00003680| 09 63 61 73 65 20 69 6e | 44 6f 77 6e 42 75 74 74 |.case in|DownButt|
|00003690| 6f 6e 3a 0d 09 09 09 54 | 72 61 63 6b 43 6f 6e 74 |on:....T|rackCont|
|000036a0| 72 6f 6c 28 6d 73 67 2d | 3e 63 6f 6e 74 72 6f 6c |rol(msg-|>control|
|000036b0| 2c 6d 6f 75 73 65 50 6f | 73 2c 28 50 72 6f 63 50 |,mousePo|s,(ProcP|
|000036c0| 74 72 29 53 63 72 6f 6c | 6c 41 63 74 69 6f 6e 50 |tr)Scrol|lActionP|
|000036d0| 72 6f 63 29 3b 0d 09 09 | 09 62 72 65 61 6b 3b 0d |roc);...|.break;.|
|000036e0| 09 09 63 61 73 65 20 69 | 6e 54 68 75 6d 62 3a 0d |..case i|nThumb:.|
|000036f0| 09 09 09 6f 6c 64 56 61 | 6c 75 65 20 3d 20 47 65 |...oldVa|lue = Ge|
|00003700| 74 43 74 6c 56 61 6c 75 | 65 28 6d 73 67 2d 3e 63 |tCtlValu|e(msg->c|
|00003710| 6f 6e 74 72 6f 6c 29 3b | 0d 09 09 09 69 66 20 28 |ontrol);|....if (|
|00003720| 54 72 61 63 6b 43 6f 6e | 74 72 6f 6c 28 6d 73 67 |TrackCon|trol(msg|
|00003730| 2d 3e 63 6f 6e 74 72 6f | 6c 2c 6d 6f 75 73 65 50 |->contro|l,mouseP|
|00003740| 6f 73 2c 6e 69 6c 29 29 | 20 7b 0d 09 09 09 09 6e |os,nil))| {.....n|
|00003750| 65 77 56 61 6c 75 65 20 | 3d 20 47 65 74 43 74 6c |ewValue |= GetCtl|
|00003760| 56 61 6c 75 65 28 6d 73 | 67 2d 3e 63 6f 6e 74 72 |Value(ms|g->contr|
|00003770| 6f 6c 29 3b 0d 09 09 09 | 09 69 66 20 28 6f 6c 64 |ol);....|.if (old|
|00003780| 56 61 6c 75 65 21 3d 6e | 65 77 56 61 6c 75 65 29 |Value!=n|ewValue)|
|00003790| 20 7b 0d 09 09 09 09 09 | 69 66 20 28 6d 73 67 2d | {......|if (msg-|
|000037a0| 3e 63 6f 6e 74 72 6f 6c | 3d 3d 28 43 6f 6e 74 72 |>control|==(Contr|
|000037b0| 6f 6c 48 61 6e 64 6c 65 | 29 56 53 43 52 4f 4c 4c |olHandle|)VSCROLL|
|000037c0| 29 0d 09 09 09 09 09 09 | 4d 6f 76 65 47 72 61 70 |).......|MoveGrap|
|000037d0| 68 69 63 73 28 77 69 6e | 64 6f 77 2c 69 6e 66 6f |hics(win|dow,info|
|000037e0| 50 74 72 2c 30 2c 6e 65 | 77 56 61 6c 75 65 2d 6f |Ptr,0,ne|wValue-o|
|000037f0| 6c 64 56 61 6c 75 65 29 | 3b 0d 09 09 09 09 09 65 |ldValue)|;......e|
|00003800| 6c 73 65 0d 09 09 09 09 | 09 09 4d 6f 76 65 47 72 |lse.....|..MoveGr|
|00003810| 61 70 68 69 63 73 28 77 | 69 6e 64 6f 77 2c 69 6e |aphics(w|indow,in|
|00003820| 66 6f 50 74 72 2c 6e 65 | 77 56 61 6c 75 65 2d 6f |foPtr,ne|wValue-o|
|00003830| 6c 64 56 61 6c 75 65 2c | 30 29 3b 0d 09 09 09 09 |ldValue,|0);.....|
|00003840| 7d 0d 09 09 09 7d 0d 09 | 09 09 62 72 65 61 6b 3b |}....}..|..break;|
|00003850| 0d 09 7d 0d 09 09 0d 09 | 72 65 74 75 72 6e 20 6e |..}.....|return n|
|00003860| 69 6c 3b 0d 7d 0d 0d 0d | 2f 2a 20 68 61 6e 64 6c |il;.}...|/* handl|
|00003870| 65 20 73 65 6c 65 63 74 | 20 61 6c 6c 20 66 6f 72 |e select| all for|
|00003880| 20 64 72 61 77 20 77 69 | 6e 64 6f 77 20 2a 2f 0d | draw wi|ndow */.|
|00003890| 0d 76 6f 69 64 20 2a 44 | 72 61 77 53 65 6c 65 63 |.void *D|rawSelec|
|000038a0| 74 41 6c 6c 57 69 6e 64 | 6f 77 28 57 69 6e 64 6f |tAllWind|ow(Windo|
|000038b0| 77 50 74 72 20 77 69 6e | 64 6f 77 2c 57 49 6e 66 |wPtr win|dow,WInf|
|000038c0| 6f 50 74 72 20 69 6e 66 | 6f 50 74 72 2c 76 6f 69 |oPtr inf|oPtr,voi|
|000038d0| 64 20 2a 64 61 74 61 29 | 0d 7b 0d 09 23 70 72 61 |d *data)|.{..#pra|
|000038e0| 67 6d 61 20 75 6e 75 73 | 65 64 20 28 64 61 74 61 |gma unus|ed (data|
|000038f0| 29 0d 09 53 68 61 70 65 | 4c 69 73 74 50 74 72 20 |)..Shape|ListPtr |
|00003900| 73 68 61 70 65 4c 69 73 | 74 3b 0d 09 0d 09 66 6f |shapeLis|t;....fo|
|00003910| 72 20 28 73 68 61 70 65 | 4c 69 73 74 3d 69 6e 66 |r (shape|List=inf|
|00003920| 6f 50 74 72 2d 3e 64 61 | 74 61 3b 20 73 68 61 70 |oPtr->da|ta; shap|
|00003930| 65 4c 69 73 74 21 3d 6e | 69 6c 3b 20 73 68 61 70 |eList!=n|il; shap|
|00003940| 65 4c 69 73 74 3d 73 68 | 61 70 65 4c 69 73 74 2d |eList=sh|apeList-|
|00003950| 3e 6e 65 78 74 29 20 7b | 0d 09 09 73 68 61 70 65 |>next) {|...shape|
|00003960| 4c 69 73 74 2d 3e 73 65 | 6c 65 63 74 65 64 20 3d |List->se|lected =|
|00003970| 20 74 72 75 65 3b 0d 09 | 09 49 6e 76 61 6c 53 68 | true;..|.InvalSh|
|00003980| 61 70 65 41 72 65 61 28 | 77 69 6e 64 6f 77 2c 69 |apeArea(|window,i|
|00003990| 6e 66 6f 50 74 72 2c 73 | 68 61 70 65 4c 69 73 74 |nfoPtr,s|hapeList|
|000039a0| 29 3b 0d 09 7d 0d 09 0d | 09 46 69 78 44 72 61 77 |);..}...|.FixDraw|
|000039b0| 4d 65 6e 75 73 28 69 6e | 66 6f 50 74 72 29 3b 0d |Menus(in|foPtr);.|
|000039c0| 09 72 65 74 75 72 6e 20 | 6e 69 6c 3b 0d 7d 0d 0d |.return |nil;.}..|
|000039d0| 0d 2f 2a 20 68 61 6e 64 | 6c 65 20 67 72 6f 75 70 |./* hand|le group|
|000039e0| 20 73 68 61 70 65 73 20 | 66 6f 72 20 64 72 61 77 | shapes |for draw|
|000039f0| 20 77 69 6e 64 6f 77 20 | 2a 2f 0d 0d 76 6f 69 64 | window |*/..void|
|00003a00| 20 2a 44 72 61 77 47 72 | 6f 75 70 57 69 6e 64 6f | *DrawGr|oupWindo|
|00003a10| 77 28 57 69 6e 64 6f 77 | 50 74 72 20 77 69 6e 64 |w(Window|Ptr wind|
|00003a20| 6f 77 2c 57 49 6e 66 6f | 50 74 72 20 69 6e 66 6f |ow,WInfo|Ptr info|
|00003a30| 50 74 72 2c 76 6f 69 64 | 20 2a 64 61 74 61 29 0d |Ptr,void| *data).|
|00003a40| 7b 0d 09 53 68 61 70 65 | 4c 69 73 74 50 74 72 20 |{..Shape|ListPtr |
|00003a50| 73 68 61 70 65 4c 69 73 | 74 2c 70 72 65 76 53 68 |shapeLis|t,prevSh|
|00003a60| 61 70 65 2c 73 65 6c 65 | 63 74 65 64 53 68 61 70 |ape,sele|ctedShap|
|00003a70| 65 3b 0d 09 53 68 61 70 | 65 4c 69 73 74 50 74 72 |e;..Shap|eListPtr|
|00003a80| 20 67 72 6f 75 70 4c 69 | 73 74 3b 0d 09 50 6f 69 | groupLi|st;..Poi|
|00003a90| 6e 74 20 61 6e 63 68 6f | 72 2c 64 65 73 74 69 6e |nt ancho|r,destin|
|00003aa0| 61 74 69 6f 6e 2c 65 6d | 70 74 79 50 74 20 3d 20 |ation,em|ptyPt = |
|00003ab0| 7b 30 2c 30 7d 3b 0d 09 | 0d 09 2f 2f 20 70 75 74 |{0,0};..|..// put|
|00003ac0| 20 61 6c 6c 20 73 65 6c | 65 63 74 65 64 20 73 68 | all sel|ected sh|
|00003ad0| 61 70 65 73 20 69 6e 74 | 6f 20 67 72 6f 75 70 4c |apes int|o groupL|
|00003ae0| 69 73 74 2c 20 70 75 6c | 6c 69 6e 67 20 74 68 65 |ist, pul|ling the|
|00003af0| 6d 20 6f 75 74 20 6f 66 | 20 73 68 61 70 65 4c 69 |m out of| shapeLi|
|00003b00| 73 74 0d 09 0d 09 67 72 | 6f 75 70 4c 69 73 74 20 |st....gr|oupList |
|00003b10| 3d 20 6e 69 6c 3b 0d 09 | 73 68 61 70 65 4c 69 73 |= nil;..|shapeLis|
|00003b20| 74 20 3d 20 69 6e 66 6f | 50 74 72 2d 3e 64 61 74 |t = info|Ptr->dat|
|00003b30| 61 3b 0d 09 70 72 65 76 | 53 68 61 70 65 20 3d 20 |a;..prev|Shape = |
|00003b40| 6e 69 6c 3b 09 09 0d 09 | 77 68 69 6c 65 20 28 73 |nil;....|while (s|
|00003b50| 68 61 70 65 4c 69 73 74 | 21 3d 6e 69 6c 29 20 7b |hapeList|!=nil) {|
|00003b60| 0d 09 09 69 66 20 28 73 | 68 61 70 65 4c 69 73 74 |...if (s|hapeList|
|00003b70| 2d 3e 73 65 6c 65 63 74 | 65 64 29 20 7b 0d 09 09 |->select|ed) {...|
|00003b80| 09 73 65 6c 65 63 74 65 | 64 53 68 61 70 65 20 3d |.selecte|dShape =|
|00003b90| 20 73 68 61 70 65 4c 69 | 73 74 3b 0d 09 09 09 73 | shapeLi|st;....s|
|00003ba0| 65 6c 65 63 74 65 64 53 | 68 61 70 65 2d 3e 73 65 |electedS|hape->se|
|00003bb0| 6c 65 63 74 65 64 20 3d | 20 66 61 6c 73 65 3b 0d |lected =| false;.|
|00003bc0| 09 09 09 69 66 20 28 70 | 72 65 76 53 68 61 70 65 |...if (p|revShape|
|00003bd0| 29 0d 09 09 09 09 70 72 | 65 76 53 68 61 70 65 2d |).....pr|evShape-|
|00003be0| 3e 6e 65 78 74 20 3d 20 | 73 65 6c 65 63 74 65 64 |>next = |selected|
|00003bf0| 53 68 61 70 65 2d 3e 6e | 65 78 74 3b 0d 09 09 09 |Shape->n|ext;....|
|00003c00| 65 6c 73 65 0d 09 09 09 | 09 69 6e 66 6f 50 74 72 |else....|.infoPtr|
|00003c10| 2d 3e 64 61 74 61 20 3d | 20 73 68 61 70 65 4c 69 |->data =| shapeLi|
|00003c20| 73 74 2d 3e 6e 65 78 74 | 3b 0d 09 09 09 73 68 61 |st->next|;....sha|
|00003c30| 70 65 4c 69 73 74 20 3d | 20 73 68 61 70 65 4c 69 |peList =| shapeLi|
|00003c40| 73 74 2d 3e 6e 65 78 74 | 3b 0d 09 09 09 73 65 6c |st->next|;....sel|
|00003c50| 65 63 74 65 64 53 68 61 | 70 65 2d 3e 6e 65 78 74 |ectedSha|pe->next|
|00003c60| 20 3d 20 67 72 6f 75 70 | 4c 69 73 74 3b 0d 09 09 | = group|List;...|
|00003c70| 09 67 72 6f 75 70 4c 69 | 73 74 20 3d 20 73 65 6c |.groupLi|st = sel|
|00003c80| 65 63 74 65 64 53 68 61 | 70 65 3b 0d 09 0d 09 09 |ectedSha|pe;.....|
|00003c90| 7d 0d 09 09 65 6c 73 65 | 20 7b 0d 09 09 09 70 72 |}...else| {....pr|
|00003ca0| 65 76 53 68 61 70 65 20 | 3d 20 73 68 61 70 65 4c |evShape |= shapeL|
|00003cb0| 69 73 74 3b 0d 09 09 09 | 73 68 61 70 65 4c 69 73 |ist;....|shapeLis|
|00003cc0| 74 20 3d 20 73 68 61 70 | 65 4c 69 73 74 2d 3e 6e |t = shap|eList->n|
|00003cd0| 65 78 74 3b 0d 09 09 7d | 0d 09 7d 0d 09 0d 09 47 |ext;...}|..}....G|
|00003ce0| 65 74 47 72 6f 75 70 42 | 6f 75 6e 64 73 28 67 72 |etGroupB|ounds(gr|
|00003cf0| 6f 75 70 4c 69 73 74 2c | 26 61 6e 63 68 6f 72 2c |oupList,|&anchor,|
|00003d00| 26 64 65 73 74 69 6e 61 | 74 69 6f 6e 29 3b 0d 09 |&destina|tion);..|
|00003d10| 73 68 61 70 65 4c 69 73 | 74 20 3d 20 41 64 64 53 |shapeLis|t = AddS|
|00003d20| 68 61 70 65 28 6b 42 65 | 67 69 6e 47 72 6f 75 70 |hape(kBe|ginGroup|
|00003d30| 54 61 67 2c 61 6e 63 68 | 6f 72 2c 64 65 73 74 69 |Tag,anch|or,desti|
|00003d40| 6e 61 74 69 6f 6e 2c 67 | 72 6f 75 70 4c 69 73 74 |nation,g|roupList|
|00003d50| 2c 0d 09 09 09 09 09 09 | 28 53 68 61 70 65 4c 69 |,.......|(ShapeLi|
|00003d60| 73 74 50 74 72 20 2a 29 | 26 69 6e 66 6f 50 74 72 |stPtr *)|&infoPtr|
|00003d70| 2d 3e 64 61 74 61 2c 66 | 61 6c 73 65 29 3b 0d 09 |->data,f|alse);..|
|00003d80| 73 68 61 70 65 4c 69 73 | 74 2d 3e 73 65 6c 65 63 |shapeLis|t->selec|
|00003d90| 74 65 64 20 3d 20 74 72 | 75 65 3b 0d 09 49 6e 76 |ted = tr|ue;..Inv|
|00003da0| 61 6c 53 68 61 70 65 41 | 72 65 61 28 77 69 6e 64 |alShapeA|rea(wind|
|00003db0| 6f 77 2c 69 6e 66 6f 50 | 74 72 2c 73 68 61 70 65 |ow,infoP|tr,shape|
|00003dc0| 4c 69 73 74 29 3b 0d 09 | 43 6c 65 61 72 41 70 70 |List);..|ClearApp|
|00003dd0| 55 6e 64 6f 28 29 3b 0d | 09 46 69 78 44 72 61 77 |Undo();.|.FixDraw|
|00003de0| 4d 65 6e 75 73 28 69 6e | 66 6f 50 74 72 29 3b 0d |Menus(in|foPtr);.|
|00003df0| 09 0d 09 72 65 74 75 72 | 6e 20 42 61 73 65 47 72 |...retur|n BaseGr|
|00003e00| 6f 75 70 57 69 6e 64 6f | 77 28 77 69 6e 64 6f 77 |oupWindo|w(window|
|00003e10| 2c 69 6e 66 6f 50 74 72 | 2c 64 61 74 61 29 3b 0d |,infoPtr|,data);.|
|00003e20| 7d 0d 0d 0d 2f 2a 20 68 | 61 6e 64 6c 65 20 75 6e |}.../* h|andle un|
|00003e30| 67 72 6f 75 70 20 73 68 | 61 70 65 73 20 66 6f 72 |group sh|apes for|
|00003e40| 20 64 72 61 77 20 77 69 | 6e 64 6f 77 20 2a 2f 0d | draw wi|ndow */.|
|00003e50| 0d 76 6f 69 64 20 2a 44 | 72 61 77 55 6e 47 72 6f |.void *D|rawUnGro|
|00003e60| 75 70 57 69 6e 64 6f 77 | 28 57 69 6e 64 6f 77 50 |upWindow|(WindowP|
|00003e70| 74 72 20 77 69 6e 64 6f | 77 2c 57 49 6e 66 6f 50 |tr windo|w,WInfoP|
|00003e80| 74 72 20 69 6e 66 6f 50 | 74 72 2c 76 6f 69 64 20 |tr infoP|tr,void |
|00003e90| 2a 64 61 74 61 29 0d 7b | 0d 09 53 68 61 70 65 4c |*data).{|..ShapeL|
|00003ea0| 69 73 74 50 74 72 20 73 | 68 61 70 65 4c 69 73 74 |istPtr s|hapeList|
|00003eb0| 2c 70 72 65 76 53 68 61 | 70 65 2c 73 65 6c 65 63 |,prevSha|pe,selec|
|00003ec0| 74 65 64 53 68 61 70 65 | 3b 0d 09 53 68 61 70 65 |tedShape|;..Shape|
|00003ed0| 4c 69 73 74 50 74 72 20 | 75 6e 67 72 6f 75 70 53 |ListPtr |ungroupS|
|00003ee0| 68 61 70 65 73 3b 0d 09 | 0d 09 2f 2f 20 70 75 74 |hapes;..|..// put|
|00003ef0| 20 61 6c 6c 20 67 72 6f | 75 70 20 73 68 61 70 65 | all gro|up shape|
|00003f00| 73 20 69 6e 74 6f 20 75 | 6e 67 72 6f 75 70 53 68 |s into u|ngroupSh|
|00003f10| 61 70 65 73 2c 20 70 75 | 6c 6c 69 6e 67 20 74 68 |apes, pu|lling th|
|00003f20| 65 6d 20 6f 75 74 20 6f | 66 20 73 68 61 70 65 4c |em out o|f shapeL|
|00003f30| 69 73 74 0d 09 0d 09 75 | 6e 67 72 6f 75 70 53 68 |ist....u|ngroupSh|
|00003f40| 61 70 65 73 20 3d 20 6e | 69 6c 3b 0d 09 73 68 61 |apes = n|il;..sha|
|00003f50| 70 65 4c 69 73 74 20 3d | 20 69 6e 66 6f 50 74 72 |peList =| infoPtr|
|00003f60| 2d 3e 64 61 74 61 3b 0d | 09 70 72 65 76 53 68 61 |->data;.|.prevSha|
|00003f70| 70 65 20 3d 20 6e 69 6c | 3b 09 09 0d 09 77 68 69 |pe = nil|;....whi|
|00003f80| 6c 65 20 28 73 68 61 70 | 65 4c 69 73 74 21 3d 6e |le (shap|eList!=n|
|00003f90| 69 6c 29 20 7b 0d 09 09 | 69 66 20 28 73 68 61 70 |il) {...|if (shap|
|00003fa0| 65 4c 69 73 74 2d 3e 73 | 65 6c 65 63 74 65 64 20 |eList->s|elected |
|00003fb0| 26 26 20 73 68 61 70 65 | 4c 69 73 74 2d 3e 73 68 |&& shape|List->sh|
|00003fc0| 61 70 65 54 79 70 65 3d | 3d 6b 42 65 67 69 6e 47 |apeType=|=kBeginG|
|00003fd0| 72 6f 75 70 54 61 67 29 | 20 7b 0d 09 09 09 73 65 |roupTag)| {....se|
|00003fe0| 6c 65 63 74 65 64 53 68 | 61 70 65 20 3d 20 73 68 |lectedSh|ape = sh|
|00003ff0| 61 70 65 4c 69 73 74 3b | 0d 09 09 09 73 65 6c 65 |apeList;|....sele|
|00004000| 63 74 65 64 53 68 61 70 | 65 2d 3e 73 65 6c 65 63 |ctedShap|e->selec|
|00004010| 74 65 64 20 3d 20 66 61 | 6c 73 65 3b 0d 09 09 09 |ted = fa|lse;....|
|00004020| 69 66 20 28 70 72 65 76 | 53 68 61 70 65 29 0d 09 |if (prev|Shape)..|
|00004030| 09 09 09 70 72 65 76 53 | 68 61 70 65 2d 3e 6e 65 |...prevS|hape->ne|
|00004040| 78 74 20 3d 20 73 65 6c | 65 63 74 65 64 53 68 61 |xt = sel|ectedSha|
|00004050| 70 65 2d 3e 6e 65 78 74 | 3b 0d 09 09 09 65 6c 73 |pe->next|;....els|
|00004060| 65 0d 09 09 09 09 69 6e | 66 6f 50 74 72 2d 3e 64 |e.....in|foPtr->d|
|00004070| 61 74 61 20 3d 20 73 68 | 61 70 65 4c 69 73 74 2d |ata = sh|apeList-|
|00004080| 3e 6e 65 78 74 3b 0d 09 | 09 09 73 68 61 70 65 4c |>next;..|..shapeL|
|00004090| 69 73 74 20 3d 20 73 68 | 61 70 65 4c 69 73 74 2d |ist = sh|apeList-|
|000040a0| 3e 6e 65 78 74 3b 0d 09 | 09 09 73 65 6c 65 63 74 |>next;..|..select|
|000040b0| 65 64 53 68 61 70 65 2d | 3e 6e 65 78 74 20 3d 20 |edShape-|>next = |
|000040c0| 75 6e 67 72 6f 75 70 53 | 68 61 70 65 73 3b 0d 09 |ungroupS|hapes;..|
|000040d0| 09 09 75 6e 67 72 6f 75 | 70 53 68 61 70 65 73 20 |..ungrou|pShapes |
|000040e0| 3d 20 73 65 6c 65 63 74 | 65 64 53 68 61 70 65 3b |= select|edShape;|
|000040f0| 0d 09 0d 09 09 7d 0d 09 | 09 65 6c 73 65 20 7b 0d |.....}..|.else {.|
|00004100| 09 09 09 70 72 65 76 53 | 68 61 70 65 20 3d 20 73 |...prevS|hape = s|
|00004110| 68 61 70 65 4c 69 73 74 | 3b 0d 09 09 09 73 68 61 |hapeList|;....sha|
|00004120| 70 65 4c 69 73 74 20 3d | 20 73 68 61 70 65 4c 69 |peList =| shapeLi|
|00004130| 73 74 2d 3e 6e 65 78 74 | 3b 0d 09 09 7d 0d 09 7d |st->next|;...}..}|
|00004140| 0d 09 0d 09 2f 2f 20 61 | 64 64 20 61 6c 6c 20 6f |....// a|dd all o|
|00004150| 66 20 74 68 65 20 73 75 | 62 2d 67 72 6f 75 70 20 |f the su|b-group |
|00004160| 73 68 61 70 65 73 20 69 | 6e 74 6f 20 74 68 65 20 |shapes i|nto the |
|00004170| 73 68 61 70 65 20 6c 69 | 73 74 0d 09 0d 09 77 68 |shape li|st....wh|
|00004180| 69 6c 65 20 28 75 6e 67 | 72 6f 75 70 53 68 61 70 |ile (ung|roupShap|
|00004190| 65 73 21 3d 6e 69 6c 29 | 20 7b 0d 09 09 49 6e 76 |es!=nil)| {...Inv|
|000041a0| 61 6c 53 68 61 70 65 41 | 72 65 61 28 77 69 6e 64 |alShapeA|rea(wind|
|000041b0| 6f 77 2c 69 6e 66 6f 50 | 74 72 2c 75 6e 67 72 6f |ow,infoP|tr,ungro|
|000041c0| 75 70 53 68 61 70 65 73 | 29 3b 0d 09 09 0d 09 09 |upShapes|);......|
|000041d0| 73 68 61 70 65 4c 69 73 | 74 20 3d 20 75 6e 67 72 |shapeLis|t = ungr|
|000041e0| 6f 75 70 53 68 61 70 65 | 73 2d 3e 73 75 62 4c 69 |oupShape|s->subLi|
|000041f0| 73 74 3b 0d 09 09 77 68 | 69 6c 65 20 28 73 68 61 |st;...wh|ile (sha|
|00004200| 70 65 4c 69 73 74 21 3d | 6e 69 6c 29 20 7b 0d 09 |peList!=|nil) {..|
|00004210| 09 09 73 65 6c 65 63 74 | 65 64 53 68 61 70 65 20 |..select|edShape |
|00004220| 3d 20 73 68 61 70 65 4c | 69 73 74 3b 0d 09 09 09 |= shapeL|ist;....|
|00004230| 73 65 6c 65 63 74 65 64 | 53 68 61 70 65 2d 3e 73 |selected|Shape->s|
|00004240| 65 6c 65 63 74 65 64 20 | 3d 20 74 72 75 65 3b 0d |elected |= true;.|
|00004250| 09 09 09 73 68 61 70 65 | 4c 69 73 74 20 3d 20 73 |...shape|List = s|
|00004260| 68 61 70 65 4c 69 73 74 | 2d 3e 6e 65 78 74 3b 0d |hapeList|->next;.|
|00004270| 09 09 09 73 65 6c 65 63 | 74 65 64 53 68 61 70 65 |...selec|tedShape|
|00004280| 2d 3e 6e 65 78 74 20 3d | 20 69 6e 66 6f 50 74 72 |->next =| infoPtr|
|00004290| 2d 3e 64 61 74 61 3b 0d | 09 09 09 69 6e 66 6f 50 |->data;.|...infoP|
|000042a0| 74 72 2d 3e 64 61 74 61 | 20 3d 20 73 65 6c 65 63 |tr->data| = selec|
|000042b0| 74 65 64 53 68 61 70 65 | 3b 0d 09 09 7d 0d 09 09 |tedShape|;...}...|
|000042c0| 0d 09 09 73 68 61 70 65 | 4c 69 73 74 20 3d 20 75 |...shape|List = u|
|000042d0| 6e 67 72 6f 75 70 53 68 | 61 70 65 73 3b 0d 09 09 |ngroupSh|apes;...|
|000042e0| 69 66 20 28 73 68 61 70 | 65 4c 69 73 74 2d 3e 69 |if (shap|eList->i|
|000042f0| 73 53 69 67 6e 65 64 29 | 20 7b 0d 09 09 09 73 68 |sSigned)| {....sh|
|00004300| 61 70 65 4c 69 73 74 2d | 3e 64 69 67 53 69 67 2d |apeList-|>digSig-|
|00004310| 3e 73 68 6f 75 6c 64 44 | 65 6c 65 74 65 20 3d 20 |>shouldD|elete = |
|00004320| 74 72 75 65 3b 09 2f 2f | 20 69 6e 76 61 6c 69 64 |true;.//| invalid|
|00004330| 61 74 65 20 74 68 65 20 | 67 72 6f 75 70 20 6f 62 |ate the |group ob|
|00004340| 6a 20 64 69 67 69 74 61 | 6c 20 73 69 67 6e 61 74 |j digita|l signat|
|00004350| 75 72 65 0d 09 09 09 73 | 68 61 70 65 4c 69 73 74 |ure....s|hapeList|
|00004360| 2d 3e 64 69 67 53 69 67 | 2d 3e 73 68 61 70 65 20 |->digSig|->shape |
|00004370| 3d 20 6e 69 6c 3b 0d 09 | 09 7d 0d 09 09 75 6e 67 |= nil;..|.}...ung|
|00004380| 72 6f 75 70 53 68 61 70 | 65 73 20 3d 20 75 6e 67 |roupShap|es = ung|
|00004390| 72 6f 75 70 53 68 61 70 | 65 73 2d 3e 6e 65 78 74 |roupShap|es->next|
|000043a0| 3b 0d 09 09 44 69 73 70 | 6f 73 50 74 72 43 68 6b |;...Disp|osPtrChk|
|000043b0| 28 73 68 61 70 65 4c 69 | 73 74 29 3b 0d 09 7d 0d |(shapeLi|st);..}.|
|000043c0| 09 43 6c 65 61 72 41 70 | 70 55 6e 64 6f 28 29 3b |.ClearAp|pUndo();|
|000043d0| 0d 09 46 69 78 44 72 61 | 77 4d 65 6e 75 73 28 69 |..FixDra|wMenus(i|
|000043e0| 6e 66 6f 50 74 72 29 3b | 0d 09 09 09 0d 09 72 65 |nfoPtr);|......re|
|000043f0| 74 75 72 6e 20 42 61 73 | 65 55 6e 47 72 6f 75 70 |turn Bas|eUnGroup|
|00004400| 57 69 6e 64 6f 77 28 77 | 69 6e 64 6f 77 2c 69 6e |Window(w|indow,in|
|00004410| 66 6f 50 74 72 2c 64 61 | 74 61 29 3b 0d 7d 0d 0d |foPtr,da|ta);.}..|
|00004420| 0d 2f 2a 2d 2d 2d 2d 2d | 2d 2d 20 6e 6f 6e 20 77 |./*-----|-- non w|
|00004430| 69 6e 64 6f 77 2d 63 6c | 61 73 73 20 73 74 75 66 |indow-cl|ass stuf|
|00004440| 66 20 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2a 2f 0d 0d 0d |f ------|---*/...|
|00004450| 2f 2a 20 6c 65 74 20 74 | 68 65 20 75 73 65 72 20 |/* let t|he user |
|00004460| 65 6e 74 65 72 20 61 20 | 6e 65 77 20 73 68 61 70 |enter a |new shap|
|00004470| 65 20 2a 2f 0d 0d 76 6f | 69 64 20 45 6e 74 65 72 |e */..vo|id Enter|
|00004480| 4e 65 77 53 68 61 70 65 | 28 57 69 6e 64 6f 77 50 |NewShape|(WindowP|
|00004490| 74 72 20 77 69 6e 64 6f | 77 2c 57 49 6e 66 6f 50 |tr windo|w,WInfoP|
|000044a0| 74 72 20 69 6e 66 6f 50 | 74 72 2c 50 6f 69 6e 74 |tr infoP|tr,Point|
|000044b0| 20 77 68 65 72 65 29 0d | 7b 0d 09 50 6f 69 6e 74 | where).|{..Point|
|000044c0| 20 61 6e 63 68 6f 72 2c | 64 65 73 74 69 6e 61 74 | anchor,|destinat|
|000044d0| 69 6f 6e 2c 6f 66 66 73 | 65 74 50 6f 73 3b 0d 09 |ion,offs|etPos;..|
|000044e0| 50 6f 69 6e 74 20 65 6d | 70 74 79 50 74 20 3d 20 |Point em|ptyPt = |
|000044f0| 7b 30 2c 30 7d 3b 0d 09 | 50 6f 69 6e 74 20 2a 73 |{0,0};..|Point *s|
|00004500| 63 72 6f 6c 6c 50 6f 73 | 3b 0d 09 53 68 61 70 65 |crollPos|;..Shape|
|00004510| 4c 69 73 74 50 74 72 20 | 73 68 61 70 65 4c 69 73 |ListPtr |shapeLis|
|00004520| 74 3b 0d 09 0d 09 73 63 | 72 6f 6c 6c 50 6f 73 20 |t;....sc|rollPos |
|00004530| 3d 20 28 50 6f 69 6e 74 | 20 2a 29 26 69 6e 66 6f |= (Point| *)&info|
|00004540| 50 74 72 2d 3e 6f 74 68 | 65 72 44 61 74 61 5b 6b |Ptr->oth|erData[k|
|00004550| 56 69 65 77 4f 66 66 73 | 65 74 5d 3b 0d 09 61 6e |ViewOffs|et];..an|
|00004560| 63 68 6f 72 20 3d 20 77 | 68 65 72 65 3b 0d 09 47 |chor = w|here;..G|
|00004570| 6c 6f 62 61 6c 54 6f 4c | 6f 63 61 6c 28 26 61 6e |lobalToL|ocal(&an|
|00004580| 63 68 6f 72 29 3b 0d 09 | 64 65 73 74 69 6e 61 74 |chor);..|destinat|
|00004590| 69 6f 6e 20 3d 20 61 6e | 63 68 6f 72 3b 0d 09 0d |ion = an|chor;...|
|000045a0| 09 52 75 62 62 65 72 42 | 61 6e 64 53 68 61 70 65 |.RubberB|andShape|
|000045b0| 28 67 43 75 72 72 65 6e | 74 53 68 61 70 65 2c 61 |(gCurren|tShape,a|
|000045c0| 6e 63 68 6f 72 2c 26 64 | 65 73 74 69 6e 61 74 69 |nchor,&d|estinati|
|000045d0| 6f 6e 2c 65 6d 70 74 79 | 50 74 29 3b 0d 09 44 72 |on,empty|Pt);..Dr|
|000045e0| 61 77 43 75 72 72 65 6e | 74 53 68 61 70 65 28 67 |awCurren|tShape(g|
|000045f0| 43 75 72 72 65 6e 74 53 | 68 61 70 65 2c 61 6e 63 |CurrentS|hape,anc|
|00004600| 68 6f 72 2c 64 65 73 74 | 69 6e 61 74 69 6f 6e 2c |hor,dest|ination,|
|00004610| 65 6d 70 74 79 50 74 29 | 3b 0d 0d 09 6f 66 66 73 |emptyPt)|;...offs|
|00004620| 65 74 50 6f 73 2e 68 20 | 3d 20 73 63 72 6f 6c 6c |etPos.h |= scroll|
|00004630| 50 6f 73 2d 3e 68 2d 69 | 6e 66 6f 50 74 72 2d 3e |Pos->h-i|nfoPtr->|
|00004640| 6c 65 66 74 49 6e 64 65 | 6e 74 3b 0d 09 6f 66 66 |leftInde|nt;..off|
|00004650| 73 65 74 50 6f 73 2e 76 | 20 3d 20 73 63 72 6f 6c |setPos.v| = scrol|
|00004660| 6c 50 6f 73 2d 3e 76 2d | 69 6e 66 6f 50 74 72 2d |lPos->v-|infoPtr-|
|00004670| 3e 74 6f 70 49 6e 64 65 | 6e 74 3b 0d 09 0d 09 61 |>topInde|nt;....a|
|00004680| 6e 63 68 6f 72 2e 68 20 | 2b 3d 20 6f 66 66 73 65 |nchor.h |+= offse|
|00004690| 74 50 6f 73 2e 68 3b 0d | 09 61 6e 63 68 6f 72 2e |tPos.h;.|.anchor.|
|000046a0| 76 20 2b 3d 20 6f 66 66 | 73 65 74 50 6f 73 2e 76 |v += off|setPos.v|
|000046b0| 3b 0d 09 64 65 73 74 69 | 6e 61 74 69 6f 6e 2e 68 |;..desti|nation.h|
|000046c0| 20 2b 3d 20 6f 66 66 73 | 65 74 50 6f 73 2e 68 3b | += offs|etPos.h;|
|000046d0| 0d 09 64 65 73 74 69 6e | 61 74 69 6f 6e 2e 76 20 |..destin|ation.v |
|000046e0| 2b 3d 20 6f 66 66 73 65 | 74 50 6f 73 2e 76 3b 0d |+= offse|tPos.v;.|
|000046f0| 0d 09 66 6f 72 20 28 73 | 68 61 70 65 4c 69 73 74 |..for (s|hapeList|
|00004700| 20 3d 20 69 6e 66 6f 50 | 74 72 2d 3e 64 61 74 61 | = infoP|tr->data|
|00004710| 3b 20 73 68 61 70 65 4c | 69 73 74 21 3d 6e 69 6c |; shapeL|ist!=nil|
|00004720| 3b 20 73 68 61 70 65 4c | 69 73 74 20 3d 20 73 68 |; shapeL|ist = sh|
|00004730| 61 70 65 4c 69 73 74 2d | 3e 6e 65 78 74 29 20 7b |apeList-|>next) {|
|00004740| 0d 09 09 69 66 20 28 73 | 68 61 70 65 4c 69 73 74 |...if (s|hapeList|
|00004750| 2d 3e 73 65 6c 65 63 74 | 65 64 29 20 7b 0d 09 09 |->select|ed) {...|
|00004760| 09 73 68 61 70 65 4c 69 | 73 74 2d 3e 73 65 6c 65 |.shapeLi|st->sele|
|00004770| 63 74 65 64 20 3d 20 66 | 61 6c 73 65 3b 0d 09 09 |cted = f|alse;...|
|00004780| 09 45 72 61 73 65 41 6e | 63 68 6f 72 50 6f 69 6e |.EraseAn|chorPoin|
|00004790| 74 73 28 73 68 61 70 65 | 4c 69 73 74 2c 6f 66 66 |ts(shape|List,off|
|000047a0| 73 65 74 50 6f 73 29 3b | 0d 09 09 7d 0d 09 7d 0d |setPos);|...}..}.|
|000047b0| 0d 09 41 64 64 53 68 61 | 70 65 28 67 43 75 72 72 |..AddSha|pe(gCurr|
|000047c0| 65 6e 74 53 68 61 70 65 | 2c 61 6e 63 68 6f 72 2c |entShape|,anchor,|
|000047d0| 64 65 73 74 69 6e 61 74 | 69 6f 6e 2c 6e 69 6c 2c |destinat|ion,nil,|
|000047e0| 0d 09 09 09 09 28 53 68 | 61 70 65 4c 69 73 74 50 |.....(Sh|apeListP|
|000047f0| 74 72 20 2a 29 26 69 6e | 66 6f 50 74 72 2d 3e 64 |tr *)&in|foPtr->d|
|00004800| 61 74 61 2c 66 61 6c 73 | 65 29 3b 0d 09 41 64 64 |ata,fals|e);..Add|
|00004810| 53 68 61 70 65 55 6e 64 | 6f 28 67 43 75 72 72 65 |ShapeUnd|o(gCurre|
|00004820| 6e 74 53 68 61 70 65 2c | 61 6e 63 68 6f 72 2c 64 |ntShape,|anchor,d|
|00004830| 65 73 74 69 6e 61 74 69 | 6f 6e 2c 77 69 6e 64 6f |estinati|on,windo|
|00004840| 77 2c 69 6e 66 6f 50 74 | 72 29 3b 09 0d 7d 0d 0d |w,infoPt|r);..}..|
|00004850| 0d 2f 2a 20 64 6f 20 74 | 68 65 20 72 75 62 62 65 |./* do t|he rubbe|
|00004860| 72 20 62 61 6e 64 20 74 | 68 69 6e 67 20 77 69 74 |r band t|hing wit|
|00004870| 68 20 65 69 74 68 65 72 | 20 61 20 6e 65 77 20 6f |h either| a new o|
|00004880| 72 20 65 78 69 73 74 69 | 6e 67 20 73 68 61 70 65 |r existi|ng shape|
|00004890| 20 2a 2f 0d 0d 76 6f 69 | 64 20 52 75 62 62 65 72 | */..voi|d Rubber|
|000048a0| 42 61 6e 64 53 68 61 70 | 65 28 73 68 6f 72 74 20 |BandShap|e(short |
|000048b0| 73 68 61 70 65 54 79 70 | 65 2c 50 6f 69 6e 74 20 |shapeTyp|e,Point |
|000048c0| 61 6e 63 68 6f 72 2c 50 | 6f 69 6e 74 20 2a 72 65 |anchor,P|oint *re|
|000048d0| 74 44 65 73 74 69 6e 61 | 74 69 6f 6e 2c 50 6f 69 |tDestina|tion,Poi|
|000048e0| 6e 74 20 6f 66 66 73 65 | 74 29 0d 7b 0d 09 52 67 |nt offse|t).{..Rg|
|000048f0| 6e 48 61 6e 64 6c 65 20 | 70 72 65 76 52 67 6e 2c |nHandle |prevRgn,|
|00004900| 6e 65 77 52 67 6e 2c 69 | 6e 76 52 67 6e 2c 6f 70 |newRgn,i|nvRgn,op|
|00004910| 44 69 66 66 52 67 6e 2c | 73 77 61 70 52 67 6e 2c |DiffRgn,|swapRgn,|
|00004920| 69 6e 6e 65 72 52 67 6e | 3b 0d 09 50 6f 69 6e 74 |innerRgn|;..Point|
|00004930| 20 64 65 73 74 69 6e 61 | 74 69 6f 6e 2c 6e 65 77 | destina|tion,new|
|00004940| 44 65 73 74 3b 0d 09 0d | 09 64 65 73 74 69 6e 61 |Dest;...|.destina|
|00004950| 74 69 6f 6e 20 3d 20 2a | 72 65 74 44 65 73 74 69 |tion = *|retDesti|
|00004960| 6e 61 74 69 6f 6e 3b 0d | 09 0d 09 50 65 6e 4e 6f |nation;.|...PenNo|
|00004970| 72 6d 61 6c 28 29 3b 0d | 09 73 77 69 74 63 68 20 |rmal();.|.switch |
|00004980| 28 73 68 61 70 65 54 79 | 70 65 29 20 7b 0d 09 09 |(shapeTy|pe) {...|
|00004990| 63 61 73 65 20 6b 4c 69 | 6e 65 53 68 61 70 65 3a |case kLi|neShape:|
|000049a0| 0d 09 09 09 50 65 6e 4d | 6f 64 65 28 70 61 74 58 |....PenM|ode(patX|
|000049b0| 6f 72 29 3b 0d 09 09 09 | 44 72 61 77 43 75 72 72 |or);....|DrawCurr|
|000049c0| 65 6e 74 53 68 61 70 65 | 28 73 68 61 70 65 54 79 |entShape|(shapeTy|
|000049d0| 70 65 2c 61 6e 63 68 6f | 72 2c 64 65 73 74 69 6e |pe,ancho|r,destin|
|000049e0| 61 74 69 6f 6e 2c 6f 66 | 66 73 65 74 29 3b 0d 09 |ation,of|fset);..|
|000049f0| 09 09 77 68 69 6c 65 20 | 28 57 61 69 74 4d 6f 75 |..while |(WaitMou|
|00004a00| 73 65 55 70 28 29 29 20 | 7b 0d 09 09 09 09 47 65 |seUp()) |{.....Ge|
|00004a10| 74 4d 6f 75 73 65 28 26 | 6e 65 77 44 65 73 74 29 |tMouse(&|newDest)|
|00004a20| 3b 0d 09 09 09 09 6e 65 | 77 44 65 73 74 2e 68 20 |;.....ne|wDest.h |
|00004a30| 2d 3d 20 6f 66 66 73 65 | 74 2e 68 3b 0d 09 09 09 |-= offse|t.h;....|
|00004a40| 09 6e 65 77 44 65 73 74 | 2e 76 20 2d 3d 20 6f 66 |.newDest|.v -= of|
|00004a50| 66 73 65 74 2e 76 3b 0d | 09 09 09 09 69 66 20 28 |fset.v;.|....if (|
|00004a60| 21 45 71 75 61 6c 50 74 | 28 6e 65 77 44 65 73 74 |!EqualPt|(newDest|
|00004a70| 2c 64 65 73 74 69 6e 61 | 74 69 6f 6e 29 29 20 7b |,destina|tion)) {|
|00004a80| 0d 09 09 09 09 09 44 72 | 61 77 43 75 72 72 65 6e |......Dr|awCurren|
|00004a90| 74 53 68 61 70 65 28 73 | 68 61 70 65 54 79 70 65 |tShape(s|hapeType|
|00004aa0| 2c 61 6e 63 68 6f 72 2c | 64 65 73 74 69 6e 61 74 |,anchor,|destinat|
|00004ab0| 69 6f 6e 2c 6f 66 66 73 | 65 74 29 3b 0d 09 09 09 |ion,offs|et);....|
|00004ac0| 09 09 64 65 73 74 69 6e | 61 74 69 6f 6e 20 3d 20 |..destin|ation = |
|00004ad0| 6e 65 77 44 65 73 74 3b | 0d 09 09 09 09 09 44 72 |newDest;|......Dr|
|00004ae0| 61 77 43 75 72 72 65 6e | 74 53 68 61 70 65 28 73 |awCurren|tShape(s|
|00004af0| 68 61 70 65 54 79 70 65 | 2c 61 6e 63 68 6f 72 2c |hapeType|,anchor,|
|00004b00| 64 65 73 74 69 6e 61 74 | 69 6f 6e 2c 6f 66 66 73 |destinat|ion,offs|
|00004b10| 65 74 29 3b 0d 09 09 09 | 09 7d 0d 09 09 09 7d 0d |et);....|.}....}.|
|00004b20| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 64 65 66 61 |...break|;...defa|
|00004b30| 75 6c 74 3a 0d 09 09 09 | 70 72 65 76 52 67 6e 20 |ult:....|prevRgn |
|00004b40| 3d 20 4e 65 77 52 67 6e | 28 29 3b 0d 09 09 09 6e |= NewRgn|();....n|
|00004b50| 65 77 52 67 6e 20 3d 20 | 4e 65 77 52 67 6e 28 29 |ewRgn = |NewRgn()|
|00004b60| 3b 0d 09 09 09 69 6e 76 | 52 67 6e 20 3d 20 4e 65 |;....inv|Rgn = Ne|
|00004b70| 77 52 67 6e 28 29 3b 0d | 09 09 09 6f 70 44 69 66 |wRgn();.|...opDif|
|00004b80| 66 52 67 6e 20 3d 20 4e | 65 77 52 67 6e 28 29 3b |fRgn = N|ewRgn();|
|00004b90| 0d 09 09 09 69 6e 6e 65 | 72 52 67 6e 20 3d 20 4e |....inne|rRgn = N|
|00004ba0| 65 77 52 67 6e 28 29 3b | 0d 09 09 09 0d 09 09 09 |ewRgn();|........|
|00004bb0| 4f 70 65 6e 52 67 6e 28 | 29 3b 0d 09 09 09 44 72 |OpenRgn(|);....Dr|
|00004bc0| 61 77 43 75 72 72 65 6e | 74 53 68 61 70 65 28 73 |awCurren|tShape(s|
|00004bd0| 68 61 70 65 54 79 70 65 | 2c 61 6e 63 68 6f 72 2c |hapeType|,anchor,|
|00004be0| 64 65 73 74 69 6e 61 74 | 69 6f 6e 2c 6f 66 66 73 |destinat|ion,offs|
|00004bf0| 65 74 29 3b 0d 09 09 09 | 43 6c 6f 73 65 52 67 6e |et);....|CloseRgn|
|00004c00| 28 70 72 65 76 52 67 6e | 29 3b 0d 09 09 09 43 6f |(prevRgn|);....Co|
|00004c10| 70 79 52 67 6e 28 70 72 | 65 76 52 67 6e 2c 69 6e |pyRgn(pr|evRgn,in|
|00004c20| 6e 65 72 52 67 6e 29 3b | 0d 09 09 09 49 6e 73 65 |nerRgn);|....Inse|
|00004c30| 74 52 67 6e 28 69 6e 6e | 65 72 52 67 6e 2c 31 2c |tRgn(inn|erRgn,1,|
|00004c40| 31 29 3b 0d 09 09 09 44 | 69 66 66 52 67 6e 28 70 |1);....D|iffRgn(p|
|00004c50| 72 65 76 52 67 6e 2c 69 | 6e 6e 65 72 52 67 6e 2c |revRgn,i|nnerRgn,|
|00004c60| 70 72 65 76 52 67 6e 29 | 3b 0d 09 09 09 0d 09 09 |prevRgn)|;.......|
|00004c70| 09 49 6e 76 65 72 74 52 | 67 6e 28 70 72 65 76 52 |.InvertR|gn(prevR|
|00004c80| 67 6e 29 3b 0d 09 09 09 | 45 6d 70 74 79 52 67 6e |gn);....|EmptyRgn|
|00004c90| 28 6e 65 77 52 67 6e 29 | 3b 0d 09 09 09 0d 09 09 |(newRgn)|;.......|
|00004ca0| 09 77 68 69 6c 65 20 28 | 57 61 69 74 4d 6f 75 73 |.while (|WaitMous|
|00004cb0| 65 55 70 28 29 29 20 7b | 0d 09 09 09 09 47 65 74 |eUp()) {|.....Get|
|00004cc0| 4d 6f 75 73 65 28 26 6e | 65 77 44 65 73 74 29 3b |Mouse(&n|ewDest);|
|00004cd0| 0d 09 09 09 09 6e 65 77 | 44 65 73 74 2e 68 20 2d |.....new|Dest.h -|
|00004ce0| 3d 20 6f 66 66 73 65 74 | 2e 68 3b 0d 09 09 09 09 |= offset|.h;.....|
|00004cf0| 6e 65 77 44 65 73 74 2e | 76 20 2d 3d 20 6f 66 66 |newDest.|v -= off|
|00004d00| 73 65 74 2e 76 3b 0d 09 | 09 09 09 69 66 20 28 21 |set.v;..|...if (!|
|00004d10| 45 71 75 61 6c 50 74 28 | 6e 65 77 44 65 73 74 2c |EqualPt(|newDest,|
|00004d20| 64 65 73 74 69 6e 61 74 | 69 6f 6e 29 29 20 7b 0d |destinat|ion)) {.|
|00004d30| 09 09 09 09 09 64 65 73 | 74 69 6e 61 74 69 6f 6e |.....des|tination|
|00004d40| 20 3d 20 6e 65 77 44 65 | 73 74 3b 0d 09 09 09 09 | = newDe|st;.....|
|00004d50| 09 0d 09 09 09 09 09 4f | 70 65 6e 52 67 6e 28 29 |.......O|penRgn()|
|00004d60| 3b 0d 09 09 09 09 09 44 | 72 61 77 43 75 72 72 65 |;......D|rawCurre|
|00004d70| 6e 74 53 68 61 70 65 28 | 73 68 61 70 65 54 79 70 |ntShape(|shapeTyp|
|00004d80| 65 2c 61 6e 63 68 6f 72 | 2c 64 65 73 74 69 6e 61 |e,anchor|,destina|
|00004d90| 74 69 6f 6e 2c 6f 66 66 | 73 65 74 29 3b 0d 09 09 |tion,off|set);...|
|00004da0| 09 09 09 43 6c 6f 73 65 | 52 67 6e 28 6e 65 77 52 |...Close|Rgn(newR|
|00004db0| 67 6e 29 3b 0d 09 09 09 | 09 09 43 6f 70 79 52 67 |gn);....|..CopyRg|
|00004dc0| 6e 28 6e 65 77 52 67 6e | 2c 69 6e 6e 65 72 52 67 |n(newRgn|,innerRg|
|00004dd0| 6e 29 3b 0d 09 09 09 09 | 09 49 6e 73 65 74 52 67 |n);.....|.InsetRg|
|00004de0| 6e 28 69 6e 6e 65 72 52 | 67 6e 2c 31 2c 31 29 3b |n(innerR|gn,1,1);|
|00004df0| 0d 09 09 09 09 09 44 69 | 66 66 52 67 6e 28 6e 65 |......Di|ffRgn(ne|
|00004e00| 77 52 67 6e 2c 69 6e 6e | 65 72 52 67 6e 2c 6e 65 |wRgn,inn|erRgn,ne|
|00004e10| 77 52 67 6e 29 3b 0d 09 | 09 09 09 09 0d 09 09 09 |wRgn);..|........|
|00004e20| 09 09 44 69 66 66 52 67 | 6e 28 70 72 65 76 52 67 |..DiffRg|n(prevRg|
|00004e30| 6e 2c 6e 65 77 52 67 6e | 2c 69 6e 76 52 67 6e 29 |n,newRgn|,invRgn)|
|00004e40| 3b 0d 09 09 09 09 09 44 | 69 66 66 52 67 6e 28 6e |;......D|iffRgn(n|
|00004e50| 65 77 52 67 6e 2c 70 72 | 65 76 52 67 6e 2c 6f 70 |ewRgn,pr|evRgn,op|
|00004e60| 44 69 66 66 52 67 6e 29 | 3b 0d 09 09 09 09 09 55 |DiffRgn)|;......U|
|00004e70| 6e 69 6f 6e 52 67 6e 28 | 69 6e 76 52 67 6e 2c 6f |nionRgn(|invRgn,o|
|00004e80| 70 44 69 66 66 52 67 6e | 2c 69 6e 76 52 67 6e 29 |pDiffRgn|,invRgn)|
|00004e90| 3b 0d 09 09 09 09 09 49 | 6e 76 65 72 74 52 67 6e |;......I|nvertRgn|
|00004ea0| 28 69 6e 76 52 67 6e 29 | 3b 0d 09 09 09 09 09 73 |(invRgn)|;......s|
|00004eb0| 77 61 70 52 67 6e 20 3d | 20 70 72 65 76 52 67 6e |wapRgn =| prevRgn|
|00004ec0| 3b 0d 09 09 09 09 09 70 | 72 65 76 52 67 6e 20 3d |;......p|revRgn =|
|00004ed0| 20 6e 65 77 52 67 6e 3b | 0d 09 09 09 09 09 6e 65 | newRgn;|......ne|
|00004ee0| 77 52 67 6e 20 3d 20 73 | 77 61 70 52 67 6e 3b 0d |wRgn = s|wapRgn;.|
|00004ef0| 09 09 09 09 7d 0d 09 09 | 09 7d 0d 09 09 09 49 6e |....}...|.}....In|
|00004f00| 76 65 72 74 52 67 6e 28 | 70 72 65 76 52 67 6e 29 |vertRgn(|prevRgn)|
|00004f10| 3b 0d 09 09 09 44 69 73 | 70 6f 73 65 52 67 6e 28 |;....Dis|poseRgn(|
|00004f20| 70 72 65 76 52 67 6e 29 | 3b 0d 09 09 09 44 69 73 |prevRgn)|;....Dis|
|00004f30| 70 6f 73 65 52 67 6e 28 | 6e 65 77 52 67 6e 29 3b |poseRgn(|newRgn);|
|00004f40| 0d 09 09 09 44 69 73 70 | 6f 73 65 52 67 6e 28 69 |....Disp|oseRgn(i|
|00004f50| 6e 76 52 67 6e 29 3b 0d | 09 09 09 44 69 73 70 6f |nvRgn);.|...Dispo|
|00004f60| 73 65 52 67 6e 28 6f 70 | 44 69 66 66 52 67 6e 29 |seRgn(op|DiffRgn)|
|00004f70| 3b 0d 09 09 09 44 69 73 | 70 6f 73 65 52 67 6e 28 |;....Dis|poseRgn(|
|00004f80| 69 6e 6e 65 72 52 67 6e | 29 3b 0d 09 09 09 62 72 |innerRgn|);....br|
|00004f90| 65 61 6b 3b 0d 09 7d 0d | 09 0d 09 50 65 6e 4e 6f |eak;..}.|...PenNo|
|00004fa0| 72 6d 61 6c 28 29 3b 0d | 09 2a 72 65 74 44 65 73 |rmal();.|.*retDes|
|00004fb0| 74 69 6e 61 74 69 6f 6e | 20 3d 20 64 65 73 74 69 |tination| = desti|
|00004fc0| 6e 61 74 69 6f 6e 3b 0d | 7d 0d 09 0d 0d 2f 2a 20 |nation;.|}..../* |
|00004fd0| 73 65 6c 65 63 74 20 6f | 72 20 6d 6f 76 65 20 6f |select o|r move o|
|00004fe0| 72 20 73 74 72 65 74 63 | 68 20 61 20 73 68 61 70 |r stretc|h a shap|
|00004ff0| 65 20 74 68 61 74 20 61 | 6c 72 65 61 64 79 20 65 |e that a|lready e|
|00005000| 78 69 73 74 73 20 2a 2f | 0d 2f 2a 20 72 65 74 75 |xists */|./* retu|
|00005010| 72 6e 20 74 72 75 65 20 | 69 66 20 61 20 73 68 61 |rn true |if a sha|
|00005020| 70 65 20 63 68 61 6e 67 | 65 64 20 2a 2f 0d 0d 42 |pe chang|ed */..B|
|00005030| 6f 6f 6c 65 61 6e 20 57 | 61 72 70 45 78 69 73 74 |oolean W|arpExist|
|00005040| 69 6e 67 53 68 61 70 65 | 28 57 69 6e 64 6f 77 50 |ingShape|(WindowP|
|00005050| 74 72 20 77 69 6e 64 6f | 77 2c 57 49 6e 66 6f 50 |tr windo|w,WInfoP|
|00005060| 74 72 20 69 6e 66 6f 50 | 74 72 2c 50 6f 69 6e 74 |tr infoP|tr,Point|
|00005070| 20 77 68 65 72 65 2c 42 | 6f 6f 6c 65 61 6e 20 65 | where,B|oolean e|
|00005080| 78 74 65 6e 64 53 65 6c | 65 63 74 69 6f 6e 29 0d |xtendSel|ection).|
|00005090| 7b 0d 09 50 6f 69 6e 74 | 20 2a 73 63 72 6f 6c 6c |{..Point| *scroll|
|000050a0| 50 6f 73 2c 6f 66 66 73 | 65 74 50 6f 73 3b 0d 09 |Pos,offs|etPos;..|
|000050b0| 53 68 61 70 65 4c 69 73 | 74 50 74 72 20 73 68 61 |ShapeLis|tPtr sha|
|000050c0| 70 65 4c 69 73 74 2c 6f | 74 68 65 72 4c 69 73 74 |peList,o|therList|
|000050d0| 3b 0d 09 42 6f 6f 6c 65 | 61 6e 20 68 69 74 53 68 |;..Boole|an hitSh|
|000050e0| 61 70 65 2c 77 61 73 53 | 65 6c 65 63 74 65 64 2c |ape,wasS|elected,|
|000050f0| 77 61 72 70 65 64 53 68 | 61 70 65 2c 63 68 61 6e |warpedSh|ape,chan|
|00005100| 67 65 64 53 68 61 70 65 | 3b 0d 09 50 6f 69 6e 74 |gedShape|;..Point|
|00005110| 20 6e 65 77 44 65 73 74 | 2c 6f 6c 64 44 65 73 74 | newDest|,oldDest|
|00005120| 2c 66 69 72 73 74 44 65 | 73 74 3b 0d 09 0d 09 77 |,firstDe|st;....w|
|00005130| 61 72 70 65 64 53 68 61 | 70 65 20 3d 20 66 61 6c |arpedSha|pe = fal|
|00005140| 73 65 3b 0d 09 68 69 74 | 53 68 61 70 65 20 3d 20 |se;..hit|Shape = |
|00005150| 66 61 6c 73 65 3b 0d 09 | 77 61 73 53 65 6c 65 63 |false;..|wasSelec|
|00005160| 74 65 64 20 3d 20 66 61 | 6c 73 65 3b 0d 09 63 68 |ted = fa|lse;..ch|
|00005170| 61 6e 67 65 64 53 68 61 | 70 65 20 3d 20 66 61 6c |angedSha|pe = fal|
|00005180| 73 65 3b 0d 09 0d 09 2f | 2f 20 64 65 74 65 72 6d |se;..../|/ determ|
|00005190| 69 6e 65 20 6f 66 66 73 | 65 74 73 20 64 75 65 20 |ine offs|ets due |
|000051a0| 74 6f 20 73 63 72 6f 6c | 6c 69 6e 67 2c 20 69 6e |to scrol|ling, in|
|000051b0| 64 65 6e 74 2c 20 67 6c | 6f 62 61 6c 2d 6c 6f 63 |dent, gl|obal-loc|
|000051c0| 61 6c 20 63 68 61 6e 67 | 65 73 0d 09 0d 09 73 63 |al chang|es....sc|
|000051d0| 72 6f 6c 6c 50 6f 73 20 | 3d 20 28 50 6f 69 6e 74 |rollPos |= (Point|
|000051e0| 20 2a 29 26 69 6e 66 6f | 50 74 72 2d 3e 6f 74 68 | *)&info|Ptr->oth|
|000051f0| 65 72 44 61 74 61 5b 6b | 56 69 65 77 4f 66 66 73 |erData[k|ViewOffs|
|00005200| 65 74 5d 3b 0d 09 6f 66 | 66 73 65 74 50 6f 73 2e |et];..of|fsetPos.|
|00005210| 68 20 3d 20 69 6e 66 6f | 50 74 72 2d 3e 6c 65 66 |h = info|Ptr->lef|
|00005220| 74 49 6e 64 65 6e 74 20 | 2d 20 73 63 72 6f 6c 6c |tIndent |- scroll|
|00005230| 50 6f 73 2d 3e 68 3b 0d | 09 6f 66 66 73 65 74 50 |Pos->h;.|.offsetP|
|00005240| 6f 73 2e 76 20 3d 20 69 | 6e 66 6f 50 74 72 2d 3e |os.v = i|nfoPtr->|
|00005250| 74 6f 70 49 6e 64 65 6e | 74 20 2d 20 73 63 72 6f |topInden|t - scro|
|00005260| 6c 6c 50 6f 73 2d 3e 76 | 3b 0d 09 47 6c 6f 62 61 |llPos->v|;..Globa|
|00005270| 6c 54 6f 4c 6f 63 61 6c | 28 26 77 68 65 72 65 29 |lToLocal|(&where)|
|00005280| 3b 0d 0d 09 2f 2f 20 64 | 6f 20 68 69 74 20 74 65 |;...// d|o hit te|
|00005290| 73 74 69 6e 67 0d 09 0d | 09 73 68 61 70 65 4c 69 |sting...|.shapeLi|
|000052a0| 73 74 20 3d 20 69 6e 66 | 6f 50 74 72 2d 3e 64 61 |st = inf|oPtr->da|
|000052b0| 74 61 3b 0d 09 77 68 69 | 6c 65 20 28 73 68 61 70 |ta;..whi|le (shap|
|000052c0| 65 4c 69 73 74 20 26 26 | 20 21 68 69 74 53 68 61 |eList &&| !hitSha|
|000052d0| 70 65 29 20 7b 0d 09 09 | 68 69 74 53 68 61 70 65 |pe) {...|hitShape|
|000052e0| 20 3d 20 43 68 65 63 6b | 48 69 74 53 68 61 70 65 | = Check|HitShape|
|000052f0| 28 77 69 6e 64 6f 77 2c | 69 6e 66 6f 50 74 72 2c |(window,|infoPtr,|
|00005300| 6f 66 66 73 65 74 50 6f | 73 2c 77 68 65 72 65 2c |offsetPo|s,where,|
|00005310| 73 68 61 70 65 4c 69 73 | 74 2c 26 77 61 72 70 65 |shapeLis|t,&warpe|
|00005320| 64 53 68 61 70 65 29 3b | 0d 09 09 69 66 20 28 21 |dShape);|...if (!|
|00005330| 68 69 74 53 68 61 70 65 | 29 0d 09 09 09 73 68 61 |hitShape|)....sha|
|00005340| 70 65 4c 69 73 74 20 3d | 20 73 68 61 70 65 4c 69 |peList =| shapeLi|
|00005350| 73 74 2d 3e 6e 65 78 74 | 3b 0d 09 09 69 66 20 28 |st->next|;...if (|
|00005360| 77 61 72 70 65 64 53 68 | 61 70 65 29 0d 09 09 09 |warpedSh|ape)....|
|00005370| 63 68 61 6e 67 65 64 53 | 68 61 70 65 20 3d 20 74 |changedS|hape = t|
|00005380| 72 75 65 3b 0d 09 7d 0d | 09 0d 09 0d 09 2f 2f 20 |rue;..}.|.....// |
|00005390| 6d 61 72 6b 20 73 68 61 | 70 65 20 73 65 6c 65 63 |mark sha|pe selec|
|000053a0| 74 65 64 0d 0d 09 69 66 | 20 28 68 69 74 53 68 61 |ted...if| (hitSha|
|000053b0| 70 65 29 20 7b 0d 09 09 | 0d 09 09 69 66 20 28 73 |pe) {...|...if (s|
|000053c0| 68 61 70 65 4c 69 73 74 | 2d 3e 73 65 6c 65 63 74 |hapeList|->select|
|000053d0| 65 64 3d 3d 66 61 6c 73 | 65 29 20 7b 0d 09 09 09 |ed==fals|e) {....|
|000053e0| 77 61 73 53 65 6c 65 63 | 74 65 64 20 3d 20 66 61 |wasSelec|ted = fa|
|000053f0| 6c 73 65 3b 0d 09 09 09 | 73 68 61 70 65 4c 69 73 |lse;....|shapeLis|
|00005400| 74 2d 3e 73 65 6c 65 63 | 74 65 64 20 3d 20 74 72 |t->selec|ted = tr|
|00005410| 75 65 3b 0d 09 09 7d 0d | 09 09 65 6c 73 65 0d 09 |ue;...}.|..else..|
|00005420| 09 09 77 61 73 53 65 6c | 65 63 74 65 64 20 3d 20 |..wasSel|ected = |
|00005430| 74 72 75 65 3b 0d 09 7d | 0d 09 09 0d 09 2f 2f 20 |true;..}|.....// |
|00005440| 69 66 20 73 68 69 66 74 | 20 77 61 73 6e 27 74 20 |if shift| wasn't |
|00005450| 68 65 6c 64 2c 20 75 6e | 73 65 6c 65 63 74 20 61 |held, un|select a|
|00005460| 6c 6c 20 6f 74 68 65 72 | 20 6f 62 6a 65 63 74 73 |ll other| objects|
|00005470| 0d 09 0d 09 69 66 20 28 | 28 65 78 74 65 6e 64 53 |....if (|(extendS|
|00005480| 65 6c 65 63 74 69 6f 6e | 3d 3d 66 61 6c 73 65 29 |election|==false)|
|00005490| 20 26 26 20 28 28 77 61 | 72 70 65 64 53 68 61 70 | && ((wa|rpedShap|
|000054a0| 65 3d 3d 74 72 75 65 29 | 7c 7c 28 68 69 74 53 68 |e==true)|||(hitSh|
|000054b0| 61 70 65 3d 3d 66 61 6c | 73 65 29 7c 7c 28 77 61 |ape==fal|se)||(wa|
|000054c0| 73 53 65 6c 65 63 74 65 | 64 3d 3d 66 61 6c 73 65 |sSelecte|d==false|
|000054d0| 29 29 29 20 7b 0d 09 09 | 66 6f 72 20 28 6f 74 68 |))) {...|for (oth|
|000054e0| 65 72 4c 69 73 74 20 3d | 20 69 6e 66 6f 50 74 72 |erList =| infoPtr|
|000054f0| 2d 3e 64 61 74 61 3b 20 | 6f 74 68 65 72 4c 69 73 |->data; |otherLis|
|00005500| 74 21 3d 6e 69 6c 3b 20 | 6f 74 68 65 72 4c 69 73 |t!=nil; |otherLis|
|00005510| 74 20 3d 20 6f 74 68 65 | 72 4c 69 73 74 2d 3e 6e |t = othe|rList->n|
|00005520| 65 78 74 29 20 7b 0d 09 | 09 09 69 66 20 28 6f 74 |ext) {..|..if (ot|
|00005530| 68 65 72 4c 69 73 74 2d | 3e 73 65 6c 65 63 74 65 |herList-|>selecte|
|00005540| 64 20 26 26 20 28 21 68 | 69 74 53 68 61 70 65 7c |d && (!h|itShape||
|00005550| 7c 28 6f 74 68 65 72 4c | 69 73 74 21 3d 73 68 61 ||(otherL|ist!=sha|
|00005560| 70 65 4c 69 73 74 29 7c | 7c 21 73 68 61 70 65 4c |peList)|||!shapeL|
|00005570| 69 73 74 2d 3e 73 65 6c | 65 63 74 65 64 29 29 20 |ist->sel|ected)) |
|00005580| 7b 0d 09 09 09 09 6f 74 | 68 65 72 4c 69 73 74 2d |{.....ot|herList-|
|00005590| 3e 73 65 6c 65 63 74 65 | 64 20 3d 20 66 61 6c 73 |>selecte|d = fals|
|000055a0| 65 3b 0d 09 09 09 09 45 | 72 61 73 65 41 6e 63 68 |e;.....E|raseAnch|
|000055b0| 6f 72 50 6f 69 6e 74 73 | 28 6f 74 68 65 72 4c 69 |orPoints|(otherLi|
|000055c0| 73 74 2c 6f 66 66 73 65 | 74 50 6f 73 29 3b 0d 09 |st,offse|tPos);..|
|000055d0| 09 09 7d 0d 09 09 7d 0d | 09 7d 0d 0d 09 69 66 20 |..}...}.|.}...if |
|000055e0| 28 68 69 74 53 68 61 70 | 65 29 20 7b 0d 09 0d 09 |(hitShap|e) {....|
|000055f0| 09 66 6f 72 20 28 6f 74 | 68 65 72 4c 69 73 74 20 |.for (ot|herList |
|00005600| 3d 20 69 6e 66 6f 50 74 | 72 2d 3e 64 61 74 61 3b |= infoPt|r->data;|
|00005610| 20 6f 74 68 65 72 4c 69 | 73 74 21 3d 6e 69 6c 3b | otherLi|st!=nil;|
|00005620| 20 6f 74 68 65 72 4c 69 | 73 74 20 3d 20 6f 74 68 | otherLi|st = oth|
|00005630| 65 72 4c 69 73 74 2d 3e | 6e 65 78 74 29 20 7b 0d |erList->|next) {.|
|00005640| 09 09 09 69 66 20 28 6f | 74 68 65 72 4c 69 73 74 |...if (o|therList|
|00005650| 2d 3e 73 65 6c 65 63 74 | 65 64 29 20 7b 0d 09 09 |->select|ed) {...|
|00005660| 09 09 49 6e 76 61 6c 53 | 68 61 70 65 41 72 65 61 |..InvalS|hapeArea|
|00005670| 28 77 69 6e 64 6f 77 2c | 69 6e 66 6f 50 74 72 2c |(window,|infoPtr,|
|00005680| 6f 74 68 65 72 4c 69 73 | 74 29 3b 0d 09 09 09 7d |otherLis|t);....}|
|00005690| 0d 09 09 7d 0d 09 09 0d | 09 09 2f 2f 20 64 6f 20 |...}....|..// do |
|000056a0| 73 68 61 70 65 20 6d 6f | 76 69 6e 67 20 73 74 75 |shape mo|ving stu|
|000056b0| 66 66 0d 09 09 0d 09 09 | 47 65 74 4d 6f 75 73 65 |ff......|GetMouse|
|000056c0| 28 26 6f 6c 64 44 65 73 | 74 29 3b 0d 09 09 6e 65 |(&oldDes|t);...ne|
|000056d0| 77 44 65 73 74 20 3d 20 | 6f 6c 64 44 65 73 74 3b |wDest = |oldDest;|
|000056e0| 0d 09 09 77 68 69 6c 65 | 20 28 57 61 69 74 4d 6f |...while| (WaitMo|
|000056f0| 75 73 65 55 70 28 29 20 | 26 26 20 45 71 75 61 6c |useUp() |&& Equal|
|00005700| 50 74 28 6e 65 77 44 65 | 73 74 2c 6f 6c 64 44 65 |Pt(newDe|st,oldDe|
|00005710| 73 74 29 29 0d 09 09 09 | 47 65 74 4d 6f 75 73 65 |st))....|GetMouse|
|00005720| 28 26 6e 65 77 44 65 73 | 74 29 3b 0d 09 09 69 66 |(&newDes|t);...if|
|00005730| 20 28 21 45 71 75 61 6c | 50 74 28 6e 65 77 44 65 | (!Equal|Pt(newDe|
|00005740| 73 74 2c 6f 6c 64 44 65 | 73 74 29 29 20 7b 0d 09 |st,oldDe|st)) {..|
|00005750| 09 0d 09 09 09 2f 2f 20 | 64 72 61 77 20 73 68 61 |.....// |draw sha|
|00005760| 70 65 20 69 6e 20 67 72 | 61 79 2c 20 73 69 6e 63 |pe in gr|ay, sinc|
|00005770| 65 20 77 65 27 72 65 20 | 67 6f 69 6e 67 20 74 6f |e we're |going to|
|00005780| 20 6d 6f 76 65 20 69 74 | 0d 09 09 09 0d 09 09 09 | move it|........|
|00005790| 66 6f 72 20 28 6f 74 68 | 65 72 4c 69 73 74 20 3d |for (oth|erList =|
|000057a0| 20 69 6e 66 6f 50 74 72 | 2d 3e 64 61 74 61 3b 20 | infoPtr|->data; |
|000057b0| 6f 74 68 65 72 4c 69 73 | 74 21 3d 6e 69 6c 3b 20 |otherLis|t!=nil; |
|000057c0| 6f 74 68 65 72 4c 69 73 | 74 20 3d 20 6f 74 68 65 |otherLis|t = othe|
|000057d0| 72 4c 69 73 74 2d 3e 6e | 65 78 74 29 20 7b 0d 09 |rList->n|ext) {..|
|000057e0| 09 09 09 69 66 20 28 6f | 74 68 65 72 4c 69 73 74 |...if (o|therList|
|000057f0| 2d 3e 73 65 6c 65 63 74 | 65 64 29 20 7b 0d 09 09 |->select|ed) {...|
|00005800| 09 09 09 23 69 66 64 65 | 66 20 64 61 6e 67 65 72 |...#ifde|f danger|
|00005810| 6f 75 73 50 61 74 74 65 | 72 6e 0d 09 09 09 09 09 |ousPatte|rn......|
|00005820| 50 65 6e 50 61 74 28 71 | 64 2e 67 72 61 79 29 3b |PenPat(q|d.gray);|
|00005830| 0d 09 09 09 09 09 23 65 | 6c 73 65 0d 09 09 09 09 |......#e|lse.....|
|00005840| 09 50 65 6e 50 61 74 28 | 26 71 64 2e 67 72 61 79 |.PenPat(|&qd.gray|
|00005850| 29 3b 0d 09 09 09 09 09 | 23 65 6e 64 69 66 0d 09 |);......|#endif..|
|00005860| 09 09 09 09 44 72 61 77 | 53 68 61 70 65 4f 62 6a |....Draw|ShapeObj|
|00005870| 65 63 74 28 6f 74 68 65 | 72 4c 69 73 74 2c 6f 66 |ect(othe|rList,of|
|00005880| 66 73 65 74 50 6f 73 2c | 66 61 6c 73 65 29 3b 0d |fsetPos,|false);.|
|00005890| 09 09 09 09 09 23 69 66 | 64 65 66 20 64 61 6e 67 |.....#if|def dang|
|000058a0| 65 72 6f 75 73 50 61 74 | 74 65 72 6e 0d 09 09 09 |erousPat|tern....|
|000058b0| 09 09 50 65 6e 50 61 74 | 28 71 64 2e 62 6c 61 63 |..PenPat|(qd.blac|
|000058c0| 6b 29 3b 0d 09 09 09 09 | 09 23 65 6c 73 65 0d 09 |k);.....|.#else..|
|000058d0| 09 09 09 09 50 65 6e 50 | 61 74 28 26 71 64 2e 62 |....PenP|at(&qd.b|
|000058e0| 6c 61 63 6b 29 3b 0d 09 | 09 09 09 09 23 65 6e 64 |lack);..|....#end|
|000058f0| 69 66 0d 09 09 09 09 09 | 50 65 6e 4d 6f 64 65 28 |if......|PenMode(|
|00005900| 70 61 74 58 6f 72 29 3b | 0d 09 09 09 09 09 44 72 |patXor);|......Dr|
|00005910| 61 77 53 68 61 70 65 4f | 62 6a 65 63 74 28 6f 74 |awShapeO|bject(ot|
|00005920| 68 65 72 4c 69 73 74 2c | 6f 66 66 73 65 74 50 6f |herList,|offsetPo|
|00005930| 73 2c 66 61 6c 73 65 29 | 3b 0d 09 09 09 09 7d 0d |s,false)|;.....}.|
|00005940| 09 09 09 7d 0d 09 09 09 | 0d 09 09 09 2f 2f 20 6d |...}....|....// m|
|00005950| 6f 76 65 20 73 68 61 70 | 65 28 73 29 20 68 65 72 |ove shap|e(s) her|
|00005960| 65 0d 0d 09 09 09 47 65 | 74 4d 6f 75 73 65 28 26 |e.....Ge|tMouse(&|
|00005970| 66 69 72 73 74 44 65 73 | 74 29 3b 0d 09 09 09 6e |firstDes|t);....n|
|00005980| 65 77 44 65 73 74 20 3d | 20 66 69 72 73 74 44 65 |ewDest =| firstDe|
|00005990| 73 74 3b 0d 09 09 09 77 | 68 69 6c 65 20 28 57 61 |st;....w|hile (Wa|
|000059a0| 69 74 4d 6f 75 73 65 55 | 70 28 29 29 20 7b 0d 09 |itMouseU|p()) {..|
|000059b0| 09 09 09 6f 6c 64 44 65 | 73 74 20 3d 20 6e 65 77 |...oldDe|st = new|
|000059c0| 44 65 73 74 3b 0d 09 09 | 09 09 47 65 74 4d 6f 75 |Dest;...|..GetMou|
|000059d0| 73 65 28 26 6e 65 77 44 | 65 73 74 29 3b 0d 09 09 |se(&newD|est);...|
|000059e0| 09 09 69 66 20 28 21 45 | 71 75 61 6c 50 74 28 6f |..if (!E|qualPt(o|
|000059f0| 6c 64 44 65 73 74 2c 6e | 65 77 44 65 73 74 29 29 |ldDest,n|ewDest))|
|00005a00| 20 7b 0d 09 09 09 09 09 | 6f 6c 64 44 65 73 74 2e | {......|oldDest.|
|00005a10| 68 20 3d 20 6f 66 66 73 | 65 74 50 6f 73 2e 68 20 |h = offs|etPos.h |
|00005a20| 2d 20 66 69 72 73 74 44 | 65 73 74 2e 68 20 2b 20 |- firstD|est.h + |
|00005a30| 6f 6c 64 44 65 73 74 2e | 68 3b 0d 09 09 09 09 09 |oldDest.|h;......|
|00005a40| 6f 6c 64 44 65 73 74 2e | 76 20 3d 20 6f 66 66 73 |oldDest.|v = offs|
|00005a50| 65 74 50 6f 73 2e 76 20 | 2d 20 66 69 72 73 74 44 |etPos.v |- firstD|
|00005a60| 65 73 74 2e 76 20 2b 20 | 6f 6c 64 44 65 73 74 2e |est.v + |oldDest.|
|00005a70| 76 3b 0d 09 09 09 09 09 | 66 6f 72 20 28 6f 74 68 |v;......|for (oth|
|00005a80| 65 72 4c 69 73 74 20 3d | 20 69 6e 66 6f 50 74 72 |erList =| infoPtr|
|00005a90| 2d 3e 64 61 74 61 3b 20 | 6f 74 68 65 72 4c 69 73 |->data; |otherLis|
|00005aa0| 74 21 3d 6e 69 6c 3b 20 | 6f 74 68 65 72 4c 69 73 |t!=nil; |otherLis|
|00005ab0| 74 20 3d 20 6f 74 68 65 | 72 4c 69 73 74 2d 3e 6e |t = othe|rList->n|
|00005ac0| 65 78 74 29 20 7b 0d 09 | 09 09 09 09 09 69 66 20 |ext) {..|.....if |
|00005ad0| 28 6f 74 68 65 72 4c 69 | 73 74 2d 3e 73 65 6c 65 |(otherLi|st->sele|
|00005ae0| 63 74 65 64 29 0d 09 09 | 09 09 09 09 09 44 72 61 |cted)...|.....Dra|
|00005af0| 77 53 68 61 70 65 4f 62 | 6a 65 63 74 28 6f 74 68 |wShapeOb|ject(oth|
|00005b00| 65 72 4c 69 73 74 2c 6f | 6c 64 44 65 73 74 2c 66 |erList,o|ldDest,f|
|00005b10| 61 6c 73 65 29 3b 0d 09 | 09 09 09 09 7d 0d 09 09 |alse);..|....}...|
|00005b20| 09 09 09 6f 6c 64 44 65 | 73 74 2e 68 20 3d 20 6f |...oldDe|st.h = o|
|00005b30| 66 66 73 65 74 50 6f 73 | 2e 68 20 2d 20 66 69 72 |ffsetPos|.h - fir|
|00005b40| 73 74 44 65 73 74 2e 68 | 20 2b 20 6e 65 77 44 65 |stDest.h| + newDe|
|00005b50| 73 74 2e 68 3b 0d 09 09 | 09 09 09 6f 6c 64 44 65 |st.h;...|...oldDe|
|00005b60| 73 74 2e 76 20 3d 20 6f | 66 66 73 65 74 50 6f 73 |st.v = o|ffsetPos|
|00005b70| 2e 76 20 2d 20 66 69 72 | 73 74 44 65 73 74 2e 76 |.v - fir|stDest.v|
|00005b80| 20 2b 20 6e 65 77 44 65 | 73 74 2e 76 3b 0d 09 09 | + newDe|st.v;...|
|00005b90| 09 09 09 66 6f 72 20 28 | 6f 74 68 65 72 4c 69 73 |...for (|otherLis|
|00005ba0| 74 20 3d 20 69 6e 66 6f | 50 74 72 2d 3e 64 61 74 |t = info|Ptr->dat|
|00005bb0| 61 3b 20 6f 74 68 65 72 | 4c 69 73 74 21 3d 6e 69 |a; other|List!=ni|
|00005bc0| 6c 3b 20 6f 74 68 65 72 | 4c 69 73 74 20 3d 20 6f |l; other|List = o|
|00005bd0| 74 68 65 72 4c 69 73 74 | 2d 3e 6e 65 78 74 29 20 |therList|->next) |
|00005be0| 7b 0d 09 09 09 09 09 09 | 69 66 20 28 6f 74 68 65 |{.......|if (othe|
|00005bf0| 72 4c 69 73 74 2d 3e 73 | 65 6c 65 63 74 65 64 29 |rList->s|elected)|
|00005c00| 0d 09 09 09 09 09 09 09 | 44 72 61 77 53 68 61 70 |........|DrawShap|
|00005c10| 65 4f 62 6a 65 63 74 28 | 6f 74 68 65 72 4c 69 73 |eObject(|otherLis|
|00005c20| 74 2c 6f 6c 64 44 65 73 | 74 2c 66 61 6c 73 65 29 |t,oldDes|t,false)|
|00005c30| 3b 0d 09 09 09 09 09 7d | 0d 09 09 09 09 7d 0d 09 |;......}|.....}..|
|00005c40| 09 09 7d 0d 09 09 09 66 | 6f 72 20 28 6f 74 68 65 |..}....f|or (othe|
|00005c50| 72 4c 69 73 74 20 3d 20 | 69 6e 66 6f 50 74 72 2d |rList = |infoPtr-|
|00005c60| 3e 64 61 74 61 3b 20 6f | 74 68 65 72 4c 69 73 74 |>data; o|therList|
|00005c70| 21 3d 6e 69 6c 3b 20 6f | 74 68 65 72 4c 69 73 74 |!=nil; o|therList|
|00005c80| 20 3d 20 6f 74 68 65 72 | 4c 69 73 74 2d 3e 6e 65 | = other|List->ne|
|00005c90| 78 74 29 20 7b 0d 09 09 | 09 09 69 66 20 28 6f 74 |xt) {...|..if (ot|
|00005ca0| 68 65 72 4c 69 73 74 2d | 3e 73 65 6c 65 63 74 65 |herList-|>selecte|
|00005cb0| 64 29 20 7b 0d 09 09 09 | 09 09 4f 66 66 73 65 74 |d) {....|..Offset|
|00005cc0| 53 68 61 70 65 28 6f 74 | 68 65 72 4c 69 73 74 2c |Shape(ot|herList,|
|00005cd0| 6e 65 77 44 65 73 74 2e | 68 2d 66 69 72 73 74 44 |newDest.|h-firstD|
|00005ce0| 65 73 74 2e 68 2c 6e 65 | 77 44 65 73 74 2e 76 2d |est.h,ne|wDest.v-|
|00005cf0| 66 69 72 73 74 44 65 73 | 74 2e 76 29 3b 0d 09 09 |firstDes|t.v);...|
|00005d00| 09 09 09 49 6e 76 61 6c | 53 68 61 70 65 41 72 65 |...Inval|ShapeAre|
|00005d10| 61 28 77 69 6e 64 6f 77 | 2c 69 6e 66 6f 50 74 72 |a(window|,infoPtr|
|00005d20| 2c 6f 74 68 65 72 4c 69 | 73 74 29 3b 0d 09 09 09 |,otherLi|st);....|
|00005d30| 09 7d 0d 09 09 09 7d 09 | 09 0d 09 09 09 63 68 61 |.}....}.|.....cha|
|00005d40| 6e 67 65 64 53 68 61 70 | 65 20 3d 20 74 72 75 65 |ngedShap|e = true|
|00005d50| 3b 0d 0d 09 09 7d 0d 09 | 7d 0d 09 0d 09 50 65 6e |;....}..|}....Pen|
|00005d60| 4e 6f 72 6d 61 6c 28 29 | 3b 0d 09 72 65 74 75 72 |Normal()|;..retur|
|00005d70| 6e 20 63 68 61 6e 67 65 | 64 53 68 61 70 65 3b 0d |n change|dShape;.|
|00005d80| 7d 0d 0d 0d 2f 2a 20 70 | 65 72 66 6f 72 6d 20 61 |}.../* p|erform a|
|00005d90| 20 68 69 74 20 74 65 73 | 74 20 6f 6e 20 74 68 65 | hit tes|t on the|
|00005da0| 20 6f 62 6a 65 63 74 2c | 20 72 65 74 75 72 6e 69 | object,| returni|
|00005db0| 6e 67 20 77 68 65 74 68 | 65 72 20 74 68 65 20 6f |ng wheth|er the o|
|00005dc0| 62 6a 65 63 74 20 77 61 | 73 20 68 69 74 20 6f 72 |bject wa|s hit or|
|00005dd0| 20 73 68 6f 75 6c 64 20 | 62 65 20 77 61 72 70 65 | should |be warpe|
|00005de0| 64 20 2a 2f 0d 0d 42 6f | 6f 6c 65 61 6e 20 43 68 |d */..Bo|olean Ch|
|00005df0| 65 63 6b 48 69 74 53 68 | 61 70 65 28 57 69 6e 64 |eckHitSh|ape(Wind|
|00005e00| 6f 77 50 74 72 20 77 69 | 6e 64 6f 77 2c 57 49 6e |owPtr wi|ndow,WIn|
|00005e10| 66 6f 50 74 72 20 69 6e | 66 6f 50 74 72 2c 50 6f |foPtr in|foPtr,Po|
|00005e20| 69 6e 74 20 6f 66 66 73 | 65 74 50 6f 73 2c 50 6f |int offs|etPos,Po|
|00005e30| 69 6e 74 20 68 69 74 50 | 74 2c 0d 09 09 09 09 09 |int hitP|t,......|
|00005e40| 09 53 68 61 70 65 4c 69 | 73 74 50 74 72 20 74 68 |.ShapeLi|stPtr th|
|00005e50| 65 53 68 61 70 65 2c 42 | 6f 6f 6c 65 61 6e 20 2a |eShape,B|oolean *|
|00005e60| 77 61 72 70 29 0d 7b 0d | 09 52 67 6e 48 61 6e 64 |warp).{.|.RgnHand|
|00005e70| 6c 65 20 73 68 61 70 65 | 2c 6f 76 65 72 53 68 61 |le shape|,overSha|
|00005e80| 70 65 3b 0d 09 52 65 63 | 74 20 62 6f 75 6e 64 42 |pe;..Rec|t boundB|
|00005e90| 6f 78 3b 0d 09 42 6f 6f | 6c 65 61 6e 20 68 69 74 |ox;..Boo|lean hit|
|00005ea0| 53 68 61 70 65 3b 0d 09 | 50 6f 69 6e 74 20 61 6e |Shape;..|Point an|
|00005eb0| 63 68 6f 72 2c 64 65 73 | 74 69 6e 61 74 69 6f 6e |chor,des|tination|
|00005ec0| 3b 0d 09 66 6c 6f 61 74 | 20 73 6c 6f 70 65 2c 69 |;..float| slope,i|
|00005ed0| 6e 74 65 72 63 65 70 74 | 2c 68 69 74 50 6f 69 6e |ntercept|,hitPoin|
|00005ee0| 74 3b 0d 09 53 68 61 70 | 65 4c 69 73 74 50 74 72 |t;..Shap|eListPtr|
|00005ef0| 20 67 72 6f 75 70 4c 69 | 73 74 3b 0d 09 0d 09 68 | groupLi|st;....h|
|00005f00| 69 74 53 68 61 70 65 20 | 3d 20 66 61 6c 73 65 3b |itShape |= false;|
|00005f10| 0d 09 2a 77 61 72 70 20 | 3d 20 66 61 6c 73 65 3b |..*warp |= false;|
|00005f20| 0d 09 73 68 61 70 65 20 | 3d 20 4e 65 77 52 67 6e |..shape |= NewRgn|
|00005f30| 28 29 3b 0d 09 6f 76 65 | 72 53 68 61 70 65 20 3d |();..ove|rShape =|
|00005f40| 20 4e 65 77 52 67 6e 28 | 29 3b 0d 09 09 0d 09 2f | NewRgn(|);...../|
|00005f50| 2f 20 63 68 65 63 6b 20 | 62 6f 75 6e 64 69 6e 67 |/ check |bounding|
|00005f60| 20 62 6f 78 0d 09 0d 09 | 69 66 20 28 74 68 65 53 | box....|if (theS|
|00005f70| 68 61 70 65 2d 3e 61 6e | 63 68 6f 72 2e 68 20 3c |hape->an|chor.h <|
|00005f80| 20 74 68 65 53 68 61 70 | 65 2d 3e 64 65 73 74 69 | theShap|e->desti|
|00005f90| 6e 61 74 69 6f 6e 2e 68 | 29 20 7b 0d 09 09 62 6f |nation.h|) {...bo|
|00005fa0| 75 6e 64 42 6f 78 2e 6c | 65 66 74 20 3d 20 74 68 |undBox.l|eft = th|
|00005fb0| 65 53 68 61 70 65 2d 3e | 61 6e 63 68 6f 72 2e 68 |eShape->|anchor.h|
|00005fc0| 3b 0d 09 09 62 6f 75 6e | 64 42 6f 78 2e 72 69 67 |;...boun|dBox.rig|
|00005fd0| 68 74 20 3d 20 74 68 65 | 53 68 61 70 65 2d 3e 64 |ht = the|Shape->d|
|00005fe0| 65 73 74 69 6e 61 74 69 | 6f 6e 2e 68 3b 0d 09 7d |estinati|on.h;..}|
|00005ff0| 0d 09 65 6c 73 65 20 7b | 0d 09 09 62 6f 75 6e 64 |..else {|...bound|
|00006000| 42 6f 78 2e 6c 65 66 74 | 20 3d 20 74 68 65 53 68 |Box.left| = theSh|
|00006010| 61 70 65 2d 3e 64 65 73 | 74 69 6e 61 74 69 6f 6e |ape->des|tination|
|00006020| 2e 68 3b 0d 09 09 62 6f | 75 6e 64 42 6f 78 2e 72 |.h;...bo|undBox.r|
|00006030| 69 67 68 74 20 3d 20 74 | 68 65 53 68 61 70 65 2d |ight = t|heShape-|
|00006040| 3e 61 6e 63 68 6f 72 2e | 68 3b 0d 09 7d 0d 09 69 |>anchor.|h;..}..i|
|00006050| 66 20 28 74 68 65 53 68 | 61 70 65 2d 3e 61 6e 63 |f (theSh|ape->anc|
|00006060| 68 6f 72 2e 76 20 3c 20 | 74 68 65 53 68 61 70 65 |hor.v < |theShape|
|00006070| 2d 3e 64 65 73 74 69 6e | 61 74 69 6f 6e 2e 76 29 |->destin|ation.v)|
|00006080| 20 7b 0d 09 09 62 6f 75 | 6e 64 42 6f 78 2e 74 6f | {...bou|ndBox.to|
|00006090| 70 20 3d 20 74 68 65 53 | 68 61 70 65 2d 3e 61 6e |p = theS|hape->an|
|000060a0| 63 68 6f 72 2e 76 3b 0d | 09 09 62 6f 75 6e 64 42 |chor.v;.|..boundB|
|000060b0| 6f 78 2e 62 6f 74 74 6f | 6d 20 3d 20 74 68 65 53 |ox.botto|m = theS|
|000060c0| 68 61 70 65 2d 3e 64 65 | 73 74 69 6e 61 74 69 6f |hape->de|stinatio|
|000060d0| 6e 2e 76 3b 0d 09 7d 0d | 09 65 6c 73 65 20 7b 0d |n.v;..}.|.else {.|
|000060e0| 09 09 62 6f 75 6e 64 42 | 6f 78 2e 74 6f 70 20 3d |..boundB|ox.top =|
|000060f0| 20 74 68 65 53 68 61 70 | 65 2d 3e 64 65 73 74 69 | theShap|e->desti|
|00006100| 6e 61 74 69 6f 6e 2e 76 | 3b 0d 09 09 62 6f 75 6e |nation.v|;...boun|
|00006110| 64 42 6f 78 2e 62 6f 74 | 74 6f 6d 20 3d 20 74 68 |dBox.bot|tom = th|
|00006120| 65 53 68 61 70 65 2d 3e | 61 6e 63 68 6f 72 2e 76 |eShape->|anchor.v|
|00006130| 3b 0d 09 7d 0d 09 62 6f | 75 6e 64 42 6f 78 2e 74 |;..}..bo|undBox.t|
|00006140| 6f 70 20 2b 3d 20 6f 66 | 66 73 65 74 50 6f 73 2e |op += of|fsetPos.|
|00006150| 76 3b 0d 09 62 6f 75 6e | 64 42 6f 78 2e 62 6f 74 |v;..boun|dBox.bot|
|00006160| 74 6f 6d 20 2b 3d 20 6f | 66 66 73 65 74 50 6f 73 |tom += o|ffsetPos|
|00006170| 2e 76 3b 0d 09 62 6f 75 | 6e 64 42 6f 78 2e 6c 65 |.v;..bou|ndBox.le|
|00006180| 66 74 20 2b 3d 20 6f 66 | 66 73 65 74 50 6f 73 2e |ft += of|fsetPos.|
|00006190| 68 3b 0d 09 62 6f 75 6e | 64 42 6f 78 2e 72 69 67 |h;..boun|dBox.rig|
|000061a0| 68 74 20 2b 3d 20 6f 66 | 66 73 65 74 50 6f 73 2e |ht += of|fsetPos.|
|000061b0| 68 3b 09 0d 09 49 6e 73 | 65 74 52 65 63 74 28 26 |h;...Ins|etRect(&|
|000061c0| 62 6f 75 6e 64 42 6f 78 | 2c 2d 6b 53 6c 6f 70 2c |boundBox|,-kSlop,|
|000061d0| 2d 6b 53 6c 6f 70 29 3b | 0d 0d 09 2f 2f 20 63 68 |-kSlop);|...// ch|
|000061e0| 65 63 6b 20 68 69 74 20 | 69 6e 20 64 69 67 69 74 |eck hit |in digit|
|000061f0| 61 6c 20 73 69 67 6e 61 | 74 75 72 65 20 62 75 74 |al signa|ture but|
|00006200| 74 6f 6e 0d 09 0d 09 69 | 66 20 28 44 53 49 47 48 |ton....i|f (DSIGH|
|00006210| 69 74 53 68 61 70 65 28 | 69 6e 66 6f 50 74 72 2c |itShape(|infoPtr,|
|00006220| 68 69 74 50 74 2c 6f 66 | 66 73 65 74 50 6f 73 2c |hitPt,of|fsetPos,|
|00006230| 74 68 65 53 68 61 70 65 | 29 29 0d 09 09 68 69 74 |theShape|))...hit|
|00006240| 53 68 61 70 65 20 3d 20 | 66 61 6c 73 65 3b 0d 09 |Shape = |false;..|
|00006250| 09 09 0d 09 2f 2f 20 63 | 68 65 63 6b 20 68 69 74 |....// c|heck hit|
|00006260| 20 69 6e 20 73 68 61 70 | 65 20 61 72 65 61 0d 09 | in shap|e area..|
|00006270| 0d 09 65 6c 73 65 20 69 | 66 20 28 50 74 49 6e 52 |..else i|f (PtInR|
|00006280| 65 63 74 28 68 69 74 50 | 74 2c 26 62 6f 75 6e 64 |ect(hitP|t,&bound|
|00006290| 42 6f 78 29 29 20 7b 0d | 09 09 0d 09 09 2f 2f 20 |Box)) {.|.....// |
|000062a0| 63 68 65 63 6b 20 68 69 | 74 20 6f 6e 20 67 72 6f |check hi|t on gro|
|000062b0| 75 70 20 73 68 61 70 65 | 0d 09 09 09 09 0d 09 09 |up shape|........|
|000062c0| 69 66 20 28 74 68 65 53 | 68 61 70 65 2d 3e 73 68 |if (theS|hape->sh|
|000062d0| 61 70 65 54 79 70 65 3d | 3d 6b 42 65 67 69 6e 47 |apeType=|=kBeginG|
|000062e0| 72 6f 75 70 54 61 67 29 | 20 7b 0d 09 09 09 69 66 |roupTag)| {....if|
|000062f0| 20 28 43 68 65 63 6b 48 | 69 74 41 6e 63 68 6f 72 | (CheckH|itAnchor|
|00006300| 28 74 68 65 53 68 61 70 | 65 2c 68 69 74 50 74 2c |(theShap|e,hitPt,|
|00006310| 6f 66 66 73 65 74 50 6f | 73 2c 26 61 6e 63 68 6f |offsetPo|s,&ancho|
|00006320| 72 2c 26 64 65 73 74 69 | 6e 61 74 69 6f 6e 29 29 |r,&desti|nation))|
|00006330| 0d 09 09 09 09 68 69 74 | 53 68 61 70 65 20 3d 20 |.....hit|Shape = |
|00006340| 74 72 75 65 3b 0d 09 09 | 09 65 6c 73 65 0d 09 09 |true;...|.else...|
|00006350| 09 09 66 6f 72 20 28 67 | 72 6f 75 70 4c 69 73 74 |..for (g|roupList|
|00006360| 3d 74 68 65 53 68 61 70 | 65 2d 3e 73 75 62 4c 69 |=theShap|e->subLi|
|00006370| 73 74 3b 20 67 72 6f 75 | 70 4c 69 73 74 21 3d 6e |st; grou|pList!=n|
|00006380| 69 6c 20 26 26 20 68 69 | 74 53 68 61 70 65 3d 3d |il && hi|tShape==|
|00006390| 66 61 6c 73 65 3b 0d 09 | 09 09 09 09 09 67 72 6f |false;..|.....gro|
|000063a0| 75 70 4c 69 73 74 3d 67 | 72 6f 75 70 4c 69 73 74 |upList=g|roupList|
|000063b0| 2d 3e 6e 65 78 74 29 20 | 7b 0d 09 09 09 09 09 69 |->next) |{......i|
|000063c0| 66 20 28 43 68 65 63 6b | 48 69 74 53 68 61 70 65 |f (Check|HitShape|
|000063d0| 28 77 69 6e 64 6f 77 2c | 69 6e 66 6f 50 74 72 2c |(window,|infoPtr,|
|000063e0| 6f 66 66 73 65 74 50 6f | 73 2c 68 69 74 50 74 2c |offsetPo|s,hitPt,|
|000063f0| 67 72 6f 75 70 4c 69 73 | 74 2c 77 61 72 70 29 29 |groupLis|t,warp))|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.